当前位置: 首页>>代码示例>>C#>>正文


C# Table.SetRowSpacing方法代码示例

本文整理汇总了C#中Gtk.Table.SetRowSpacing方法的典型用法代码示例。如果您正苦于以下问题:C# Table.SetRowSpacing方法的具体用法?C# Table.SetRowSpacing怎么用?C# Table.SetRowSpacing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.Table的用法示例。


在下文中一共展示了Table.SetRowSpacing方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SharpApp

    public SharpApp()
        : base("Windows")
    {
        SetDefaultSize(300,250);
        SetPosition(WindowPosition.Center);
        BorderWidth=15;
        DeleteEvent += delegate{Application.Quit();};

        Table table = new Table(8, 4, false);

        table.ColumnSpacing = 3;

        Label title = new Label("Windows");

        Alignment halign = new Alignment(0,0,0,0);

        halign.Add(title);

        table.Attach(halign, 0,1,0,1, AttachOptions.Fill, AttachOptions.Fill, 0,0);

        TextView wins = new TextView();

        wins.ModifyFg(StateType.Normal, new Gdk.Color(20,20,20));
        wins.CursorVisible = false;
        table.Attach(wins, 0,2,1,3, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill | AttachOptions.Expand, 1,1);
        Button activate = new Button("Activate");
        activate.SetSizeRequest(50,30);
        table.Attach(activate,3,4,1,2,AttachOptions.Fill, AttachOptions.Shrink,1,1);
        Alignment valign = new Alignment(0,0,0,0);
        Button close = new Button("Close");
        close.SetSizeRequest(70,30);
        valign.Add(close);
        table.SetRowSpacing(1,3);
        table.Attach(valign,3,4,2,3,AttachOptions.Fill, AttachOptions.Fill | AttachOptions.Expand,1,1);

        Alignment halign2 =  new Alignment(0,1,0,0);
        Button help = new Button("Help");
        help.SetSizeRequest(70,30);
        halign2.Add(help);
        table.SetRowSpacing(3,6);
        table.Attach(halign2, 0,1,4,5, AttachOptions.Fill, AttachOptions.Fill, 0,0);

        Button ok = new Button("Ok");
        ok.SetSizeRequest(70,30);
        table.Attach(ok,3,4,4,5,AttachOptions.Fill, AttachOptions.Fill, 0,0);

        Add(table);
        ShowAll();
    }
开发者ID:Jimmyscene,项目名称:Random,代码行数:49,代码来源:windows.cs

示例2: separaFilas

 public void separaFilas(Table tabla,int espacio)
 {
     int row=(int)tabla.NRows;
         for(int i=0;i<row;i++){
         tabla.SetRowSpacing((uint)i,(uint)espacio);
         }
 }
开发者ID:nerea123,项目名称:ad,代码行数:7,代码来源:MyWidget.cs

示例3: rellenoDelFrame

        private Widget rellenoDelFrame()
        {
            Button butonOk;
            Frame marcoEtiquetaQue;
            //Label etiquetaQue;
            Label etiquetaEntrada_x;
            Label etiquetaEntrada_y;
            //Entry entrada_x;
            //Entry entrada_y;
            Table tablaEntradas;
            VBox superCaja = null;
            uint padding = 20;

            etiquetaQue = new Label(Ej_frame.str_Pide1);
            etiquetaQue.LineWrap = true;
            etiquetaQue.Justify = Justification.Left;
            marcoEtiquetaQue = new Frame();
            marcoEtiquetaQue.BorderWidth = 10;
            marcoEtiquetaQue.Add(etiquetaQue);

            entrada_x = new Entry(3);
            entrada_x.Text = "1,0";
            etiquetaEntrada_x = new Label("valor de la x");
            entrada_y = new Entry(3);
            entrada_y.Text = "1,0";
            etiquetaEntrada_y = new Label("valor de la y");
            tablaEntradas = new Table (2, 2, true);
            tablaEntradas.SetColSpacing(0, 5);
            tablaEntradas.SetColSpacing(1, 5);
            tablaEntradas.SetRowSpacing(0, 5);
            tablaEntradas.SetRowSpacing(1, 5);
            tablaEntradas.Attach(etiquetaEntrada_x, 0, 1, 0, 1);
            tablaEntradas.Attach(entrada_x, 1, 2, 0, 1);
            tablaEntradas.Attach(etiquetaEntrada_y, 0, 1, 1, 2);
            tablaEntradas.Attach(entrada_y, 1, 2, 1, 2);
            entrada_x.WidthRequest = 4;

            butonOk = new Button ("Aplicar cambios");
            butonOk.Clicked += accionBoton;

            superCaja = new VBox (false, 5);
            superCaja.PackStart(marcoEtiquetaQue, false, false, padding);
            superCaja.PackStart(tablaEntradas, true, false, padding);
            superCaja.PackStart(butonOk, true, false, padding);

            return superCaja;
        }
开发者ID:BackupTheBerlios,项目名称:genaro,代码行数:47,代码来源:frame.cs

示例4: SetupGuiServerRelated

        /// <summary>
        /// server gui stuff:
        /// server path
        /// server username + password
        /// check server ssl certificate yes/no
        /// </summary>
        /// <param name="insertTo"></param>
        /// <param name="defaultSpacing"></param>
        void SetupGuiServerRelated(Gtk.Box insertTo, int defaultSpacing)
        {
            Gtk.Table customBox = new Gtk.Table(3, 2, false);

            // somehow you can't change the default spacing or set it for all rows
            for (int i = 0; i < 3; i++)
                customBox.SetRowSpacing((uint)i, (uint)defaultSpacing);

            // insert the labels
            customBox.Attach(new Gtk.Label(Catalog.GetString("Server path:")), 0, 1, 0, 1);
            customBox.Attach(new Gtk.Label(Catalog.GetString("Username:")), 0, 1, 1, 2);
            customBox.Attach(new Gtk.Label(Catalog.GetString("Password:")), 0, 1, 2, 3);

            insertTo.PackStart(customBox);
            server_path = new Gtk.Entry();
            customBox.Attach(server_path, 1, 2, 0, 1);
            string serverPath = Preferences.Get(AddinPreferences.SYNC_PRIVATENOTES_SERVERPATH) as String;
            server_path.Text = serverPath;
            // NO EDITOR! because we only save when "SaveConfiguration" is called
            //IPropertyEditor serverEditor = Services.Factory.CreatePropertyEditorEntry(
            //	AddinPreferences.SYNC_PRIVATENOTES_SERVERPATH, server_path);
            //serverEditor.Setup();

            server_user = new Gtk.Entry();
            customBox.Attach(server_user, 1, 2, 1, 2);
            string serverUser = Preferences.Get(AddinPreferences.SYNC_PRIVATENOTES_SERVERUSER) as String;
            server_user.Text = serverUser;
            // NO EDITOR! because we only save when "SaveConfiguration" is called
            //IPropertyEditor userEditor = Services.Factory.CreatePropertyEditorEntry(
            // AddinPreferences.SYNC_PRIVATENOTES_SERVERUSER, server_user);
            //userEditor.Setup();

            server_pass = new Gtk.Entry();
            server_pass.InvisibleChar = '*';
            server_pass.Visibility = false;
            customBox.Attach(server_pass, 1, 2, 2, 3);
            string serverpass = Preferences.Get(AddinPreferences.SYNC_PRIVATENOTES_SERVERPASS) as String;
            server_pass.Text = serverpass;
            // NO EDITOR! because we only save when "SaveConfiguration" is called
            //IPropertyEditor passEditor = Services.Factory.CreatePropertyEditorEntry(
            // AddinPreferences.SYNC_PRIVATENOTES_SERVERPASS, server_pass);
            //passEditor.Setup();

            check_ssl = new Gtk.CheckButton(Catalog.GetString("Check servers SSL certificate"));
            insertTo.PackStart(check_ssl);

            // set up check-ssl certificate stuff
            object value = Preferences.Get(AddinPreferences.SYNC_PRIVATENOTES_SERVERCHECKSSLCERT);
            if (value == null || value.Equals(true))
                check_ssl.Active = true;
        }
开发者ID:NoUsername,项目名称:PrivateNotes,代码行数:59,代码来源:EncryptedWebdavSyncServiceAddin.cs


注:本文中的Gtk.Table.SetRowSpacing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。