Skip to main content

How to Show/Hide All Items within a Category

With the help of this example you’ll learn how to hide/display all items of a category. Use the CategoryItemsVisible property of a bar manager. The code below also hides empty toolbars via the AutoHideEmptyBars property.

// ...
with dxBarManager do
begin
  // Hides empty toolbars
  AutoHideEmptyBars := True;
  // Shows/hides items within the default category
  if CategoryItemsVisible[0] = ivAlways then
    CategoryItemsVisible[0] := ivNever
  else
    CategoryItemsVisible[0] := ivAlways;
end;