Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Accessing the button item in the Vcl.CategoryButtons control


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0
Paul Jackson

Posts: 61
Registered: 3/2/17
Accessing the button item in the Vcl.CategoryButtons control  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 28, 2017 9:48 PM
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)

Server Response from: ETNAJIVE02