Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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;