How to temporarily disable a single TButtonCategory?

Viewed 138

In a Delphi 10.4.2 VCL Application, I have a TCategoryButtons object, containing several Categories (TButtonCategory). Unfortunately, TButtonCategory has not an Enabled property:

CategoryButtons1.Categories[0].Enabled := False; // undeclared identifier

So how can I temporarily disable a single TButtonCategory Category while leaving the other Categories enabled?

2 Answers

Category buttons (TButtonItem) have no Visible property as well as no Enabled property. They are always visible and enabled. This extends to the TButtonCategory, which is also always visible and enabled, but you can collapse it.

Could you put them on a panel and change the visible property on that? Would have to test this locally, but may be a work around?

Related