Ask Your Question
2

How to perform a hit test or event on a TListBoxGroupHeader in FireMonkey?

asked 2023-05-16 18:24:49 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-16 18:31:02 +0000

lakamha gravatar image

To perform a hit test or event on a TListBoxGroupHeader in FireMonkey, you can follow these steps:

  1. Add a TListBox to your FireMonkey form.
  2. Set the StyleLookup property of the TListBox to 'listboxstyle'.
  3. Add one or more TListBoxGroupHeader components to the TListBox by clicking on the 'Items' property and selecting 'Add Group Header'.
  4. Double click on the TListBox to create an OnItemClick event.
  5. Inside the OnItemClick event, check if the item clicked is a TListBoxGroupHeader by using the following code:
if ListBox1.ListItems[Item.Index] is TListBoxGroupHeader then
begin
 //perform your hit test or event here
end;
  1. You can now perform your hit test or event inside the if statement to handle the click of the TListBoxGroupHeader.

Note: The above steps assume that you are using a TListBoxGroupHeader component in your FireMonkey application. If you are using a different component, the steps may vary.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-16 18:24:49 +0000

Seen: 12 times

Last updated: May 16 '23