Thread: Accessing the button item in the Vcl.CategoryButtons control
 |
This question is not answered.
Helpful answers available: 2.
Correct answers available: 1.
|
|
Replies:
0
|
|
|
Posts:
61
Registered:
3/2/17
|
|
Hello all,
Is it possible to enable or disable a TCategoryButton's buttons? So I've built a nice little control panel for my app using the TCategoryButton to create a button list of actions. I need to be able to programmatically enable and disable them.
I don't see an Enable property in the ButtonItem class so it may not be possible.
I've tried a variety of castings in an attempt to get at the button item itself, yielding an "Argument Out Range" error. Here's an example, I've also tried casting to TBaseButtonItem, etc.
TButtonItem *buttonItem = reinterpret_cast<TButtonItem*>(catMenuItems->Categories[0].Items[4]);
TButton *button = reinterpret_cast<TButton*>(buttonItem);
button->Enabled=false;
Using version 10.2
Edited by: Paul Jackson on May 29, 2017 6:05 PM
|
|
|
Legend
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|
Connect with Us