Thread: Insert a Button Inside TListViewItem and Handling OnClick Event...
|
Replies:
3
-
Last Post:
Sep 30, 2016 11:54 PM
Last Post By: Ken Randall
|
|
|
Posts:
37
Registered:
12/20/04
|
|
Hi Eveyone,
I need to insert a button inside TListViewItem. I got using the TListView design mode but I need to implement a button onclick. I tried to use the OnClickItemEx but in Android it does not works correctly do not show the coordinates correctly.
Any suggestions to handle it? I am using Delphi Berlin 10.1
Regards,
Thiago
|
|
|
Posts:
130
Registered:
11/12/99
|
|
Thiago Silva wrote:
Hi Eveyone,
I need to insert a button inside TListViewItem. I got using the
TListView design mode but I need to implement a button onclick. I
tried to use the OnClickItemEx but in Android it does not works
correctly do not show the coordinates correctly.
Any suggestions to handle it? I am using Delphi Berlin 10.1
Regards,
Thiago
I use a TextButton and the TListView.OnButtonClick event on all
platforms.
|
|
|
|
Posts:
37
Registered:
12/20/04
|
|
Thiago Silva wrote:
Hi Eveyone,
I need to insert a button inside TListViewItem. I got using the
TListView design mode but I need to implement a button onclick. I
tried to use the OnClickItemEx but in Android it does not works
correctly do not show the coordinates correctly.
Any suggestions to handle it? I am using Delphi Berlin 10.1
Regards,
Thiago
I use a TextButton and the TListView.OnButtonClick event on all
platforms.
Thank you,
Could you gimme an example? How are you doing it ?
Regards,
Thiago.
Edited by: Thiago Silva on Sep 30, 2016 10:09 AM
|
|
|
|
Posts:
130
Registered:
11/12/99
|
|
Thiago Silva wrote:
Could you gimme an example? How are you doing it ?
If you only have one button then the following is sufficient:
procedure TSimpleListViewDelete.ListView1ButtonClick(const Sender:
TObject; const AItem: TListItem;
const AObject: TListItemSimpleControl);
begin
ShowMessage(ListView1.Items[AItem.Index].Text);
end;
|
|
|
|
Legend
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|
Connect with Us