Example #1
0
        public void ActivateFilter(int id)
        {
            FilterMenuItem item = FindFilterMenuItem(id);

            if (item != null)
            {
                item.Toggle();
            }
        }
Example #2
0
        public void AddFilterOption(int id, string label)
        {
            if (id < 0)
            {
                throw new ArgumentException("id", "must be >= 0");
            }

            FilterMenuItem item = new FilterMenuItem(id, label);

            item.Toggled += OnMenuItemToggled;
            menu.Append(item);

            if (ActiveFilterID < 0)
            {
                item.Toggle();
            }

            filter_button.Visible = true;
        }
Example #3
0
        public void AddFilterOption(int id, string label)
        {
            if(id < 0) {
                throw new ArgumentException("id", "must be >= 0");
            }

            FilterMenuItem item = new FilterMenuItem(id, label);
            item.Toggled += OnMenuItemToggled;
            menu.Append(item);

            if(ActiveFilterID < 0) {
                item.Toggle();
            }

            filter_button.Visible = true;
        }