Beispiel #1
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public Window() : base("Search...")
        {
            // Initialize Window Options
            this.SetDefaultSize(320, 250);

            // Initialize VBox
            this.vbox = new Gtk.VBox(false, 2);
            this.Add(this.vbox);

            // Initialize TopBar
            this.topbar = new TopBar();
            this.vbox.PackStart(this.topbar, false, false, 2);

            // Initialize Search Results Label
            Gtk.Label label = new Gtk.Label("<b>Search Results:</b>");
            label.UseMarkup = true;
            label.Xalign    = 0.0f;
            label.Xpad      = 5;
            this.vbox.PackStart(label, false, false, 2);

            // Initialize Search Results Viewer
            this.swResultViewer                  = new Gtk.ScrolledWindow(null, null);
            this.swResultViewer.ShadowType       = Gtk.ShadowType.None;
            this.swResultViewer.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            this.swResultViewer.VscrollbarPolicy = Gtk.PolicyType.Always;
            this.vbox.PackStart(this.swResultViewer, true, true, 2);

            // Initialize Search Results Viewer
            this.resultViewer = new ResultViewer();
            this.swResultViewer.Add(this.resultViewer);

            // Initialize Button Box
            this.vbox.PackStart(new HSeparator(), false, false, 2);
            this.hbuttonBox        = new Gtk.HButtonBox();
            this.hbuttonBox.Layout = ButtonBoxStyle.End;
            this.vbox.PackStart(this.hbuttonBox, false, true, 2);

            Gtk.Button button;

            // Find
            button = new Gtk.Button(Gtk.Stock.Find);
            this.hbuttonBox.PackEnd(button, false, false, 2);

            ShowAll();
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public Window()
            : base("Search...")
        {
            // Initialize Window Options
            this.SetDefaultSize(320, 250);

            // Initialize VBox
            this.vbox = new Gtk.VBox(false, 2);
            this.Add(this.vbox);

            // Initialize TopBar
            this.topbar = new TopBar();
            this.vbox.PackStart(this.topbar, false, false, 2);

            // Initialize Search Results Label
            Gtk.Label label = new Gtk.Label("<b>Search Results:</b>");
            label.UseMarkup = true;
            label.Xalign = 0.0f;
            label.Xpad = 5;
            this.vbox.PackStart(label, false, false, 2);

            // Initialize Search Results Viewer
            this.swResultViewer = new Gtk.ScrolledWindow(null, null);
            this.swResultViewer.ShadowType = Gtk.ShadowType.None;
            this.swResultViewer.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            this.swResultViewer.VscrollbarPolicy = Gtk.PolicyType.Always;
            this.vbox.PackStart(this.swResultViewer, true, true, 2);

            // Initialize Search Results Viewer
            this.resultViewer = new ResultViewer();
            this.swResultViewer.Add(this.resultViewer);

            // Initialize Button Box
            this.vbox.PackStart(new HSeparator(), false, false, 2);
            this.hbuttonBox = new Gtk.HButtonBox();
            this.hbuttonBox.Layout = ButtonBoxStyle.End;
            this.vbox.PackStart(this.hbuttonBox, false, true, 2);

            Gtk.Button button;

            // Find
            button = new Gtk.Button(Gtk.Stock.Find);
            this.hbuttonBox.PackEnd(button, false, false, 2);

            ShowAll();
        }