how can I get caption of an item or a category when mouse is entering on them? how can I get the current caption of an item or a category when right clicking on them? I assigned a popup menu to categorybuttons. Now I need to obtain the current item or category captions and save them in variable. Because my popup menu has an item that by clicking on it it opens a new form so I want to use this variables values here.
Something like this works at click event :
Current_Items, Current_Category: String
procedure TForm1.CategoryButtons1Click(Sender: TObject);
begin
Current_Items := CategoryButtons1.CurrentCategory.Items
[CategoryButtons1.SelectedItem.Index].Caption;
Current_Category := CategoryButtons1.CurrentCategory.Caption;
end;
But I need to obtain them when right click. Can someone helps me to do this? Thank you...
PopupComponent
property of the popup menu. And you can still pass those information as parameters to another form. I mean, in the popup menu item action event you can open your form passing the button information to the form whilst getting the current action source byPopupComponent
. – Victoriapopupcomponent
will be the wholeCategoryButtons1
– Tom BrunbergCategoryButtons1
component. There are no published properties for the categories or the individual buttons, to which a popup could be attached. – Tom BrunbergTCategoryButtons
component is a special container with no real subcomponents. – Victoria