Ejemplo n.º 1
0
        private void BuildWidget()
        {
            box           = new HBox();
            entry         = new FramelessEntry(this);
            filter_button = new HoverImageButton(IconSize.Menu, new string [] { "edit-find", Stock.Find });
            clear_button  = new HoverImageButton(IconSize.Menu, new string [] { "edit-clear", Stock.Clear });

            box.PackStart(filter_button, false, false, 0);
            box.PackStart(entry, true, true, 0);
            box.PackStart(clear_button, false, false, 0);

            Add(box);
            box.ShowAll();

            entry.StyleSet      += OnInnerEntryStyleSet;
            entry.StateChanged  += OnInnerEntryStateChanged;
            entry.FocusInEvent  += OnInnerEntryFocusEvent;
            entry.FocusOutEvent += OnInnerEntryFocusEvent;
            entry.Changed       += OnInnerEntryChanged;

            filter_button.Image.Xpad = 2;
            clear_button.Image.Xpad  = 2;
            filter_button.CanFocus   = false;
            clear_button.CanFocus    = false;

            filter_button.ButtonReleaseEvent += OnButtonReleaseEvent;
            clear_button.ButtonReleaseEvent  += OnButtonReleaseEvent;
            clear_button.Clicked             += OnClearButtonClicked;

            filter_button.Visible = false;
            clear_button.Visible  = false;
        }
Ejemplo n.º 2
0
        private void BuildWidget()
        {
            box = new HBox();
            entry = new FramelessEntry(this);
            filter_button = new HoverImageButton(IconSize.Menu, new string [] { "edit-find", Stock.Find });
            clear_button = new HoverImageButton(IconSize.Menu, new string [] { "edit-clear", Stock.Clear });

            box.PackStart(filter_button, false, false, 0);
            box.PackStart(entry, true, true, 0);
            box.PackStart(clear_button, false, false, 0);

            Add(box);
            box.ShowAll();

            entry.StyleSet += OnInnerEntryStyleSet;
            entry.StateChanged += OnInnerEntryStateChanged;
            entry.FocusInEvent += OnInnerEntryFocusEvent;
            entry.FocusOutEvent += OnInnerEntryFocusEvent;
            entry.Changed += OnInnerEntryChanged;

            filter_button.Image.Xpad = 2;
            clear_button.Image.Xpad = 2;
            filter_button.CanFocus = false;
            clear_button.CanFocus = false;

            filter_button.ButtonReleaseEvent += OnButtonReleaseEvent;
            clear_button.ButtonReleaseEvent += OnButtonReleaseEvent;
            clear_button.Clicked += OnClearButtonClicked;

            filter_button.Visible = false;
            clear_button.Visible = false;
        }