Ejemplo n.º 1
0
 void filterTextChanged(object sender, EventArgs e)
 {
     foreach (Category cat in toolboxWidget.Categories)
     {
         bool hasVisibleChild = false;
         foreach (Item child in cat.Items)
         {
             child.IsVisible  = ((ItemToolboxNode)child.Tag).Filter(filterEntry.Text);
             hasVisibleChild |= child.IsVisible;
         }
         cat.IsVisible = hasVisibleChild;
     }
     toolboxWidget.QueueDraw();
 }
Ejemplo n.º 2
0
 void refilter()
 {
     foreach (Category cat in toolboxWidget.Categories)
     {
         bool hasVisibleChild = false;
         foreach (Item child in cat.Items)
         {
             child.IsVisible  = ((ItemToolboxNode)child.Tag).Filter(filterEntry.Entry.Text);
             hasVisibleChild |= child.IsVisible;
         }
         cat.IsVisible = hasVisibleChild;
     }
     toolboxWidget.QueueDraw();
     toolboxWidget.QueueResize();
 }