예제 #1
0
파일: Tables.cs 프로젝트: sergueik/xwt_swd
        public Tables()
        {
            Table t = new Table();

            SimpleBox b = new SimpleBox(200, 20);
            t.Add(b, 0, 0);

            b = new SimpleBox(5, 20);
            t.Add(b, 1, 0);

            b = new SimpleBox(250, 20);
            t.Add(b, 0, 1, colspan: 2, hexpand: true, vexpand: true);

            b = new SimpleBox(300, 20);
            t.Add(b, 1, 2, colspan: 2);

            b = new SimpleBox(100, 20);
            t.Add(b, 2, 3);

            b = new SimpleBox(450, 20);
            t.Add(b, 0, 4, colspan: 3);

            PackStart(t);

            HBox box = new HBox();
            PackStart(box);
            t = new Table();
            t.Add(new Label("One:"), 0, 0);
            t.Add(new TextEntry(), 1, 0);
            t.Add(new Label("Two:"), 0, 1);
            t.Add(new TextEntry(), 1, 1);
            t.Add(new Label("Three:"), 0, 2);
            t.Add(new TextEntry(), 1, 2);
            t.InsertRow(1, 2);
            t.Add(new Label("One-and-a-half"), 0, 1);
            t.Add(new TextEntry() { PlaceholderText = "Just inserted" }, 1, 1);
            t.InsertRow(1, 2);
            t.Add(new SimpleBox(300, 20), 0, 1, colspan: 2);
            box.PackStart(t);
        }
예제 #2
0
        public Tables()
        {
            Table t = new Table ();

            SimpleBox b = new SimpleBox (200, 20);
            t.Attach (b, 0, 1, 0, 1);

            b = new SimpleBox (5, 20);
            t.Attach (b, 1, 2, 0, 1);

            b = new SimpleBox (250, 20);
            t.Attach (b, 0, 2, 1, 2, AttachOptions.Expand, AttachOptions.Expand);

            b = new SimpleBox (300, 20);
            t.Attach (b, 1, 3, 2, 3);

            b = new SimpleBox (100, 20);
            t.Attach (b, 2, 3, 3, 4);

            b = new SimpleBox (450, 20);
            t.Attach (b, 0, 3, 4, 5);

            PackStart (t);

            HBox box = new HBox ();
            PackStart (box);
            t = new Table ();
            t.Attach (new Label ("One:"), 0, 1, 0, 1);
            t.Attach (new TextEntry (), 1, 2, 0, 1);
            t.Attach (new Label ("Two:"), 0, 1, 1, 2);
            t.Attach (new TextEntry (), 1, 2, 1, 2);
            t.Attach (new Label ("Three:"), 0, 1, 2, 3);
            t.Attach (new TextEntry (), 1, 2, 2, 3);
            t.InsertRow (1, 2);
            t.Attach (new Label ("One-and-a-half"), 0, 1, 1, 2);
            t.Attach (new TextEntry () { PlaceholderText = "Just inserted" }, 1, 2, 1, 2);
            t.InsertRow (1, 2);
            t.Attach (new SimpleBox (300, 20), 0, 2, 1, 2);
            box.PackStart (t);
        }