public void ActivateFilter(int id) { FilterMenuItem item = FindFilterMenuItem(id); if (item != null) { item.Toggle(); } }
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; }
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; }