nibbo Active Member Licensed User Longtime User Jun 11, 2014 #1 Hi, I have a multi-column scroll view which has a button column. How can I tell in the click event which button was clicked? i.e. in vb.net we would have the currentcell of a datagrid to identify the row. Can I retrieve the tag name or something? Thanks
Hi, I have a multi-column scroll view which has a button column. How can I tell in the click event which button was clicked? i.e. in vb.net we would have the currentcell of a datagrid to identify the row. Can I retrieve the tag name or something? Thanks
klaus Expert Licensed User Longtime User Jun 11, 2014 #2 Set the row number to the Tag property of the Buttons. I suppose you have a fill routine and you have somewhere: Code: Copy For row = 0 To x ' ' Dim btn As Button btn.Initialize("Buttons") btn.Tag = row ' ' Next And then: Code: Copy Sub Buttons_Click Dim btn As Button Dim row As Int btn = Sender row = btn.Tag End Sub Upvote 0
Set the row number to the Tag property of the Buttons. I suppose you have a fill routine and you have somewhere: Code: Copy For row = 0 To x ' ' Dim btn As Button btn.Initialize("Buttons") btn.Tag = row ' ' Next And then: Code: Copy Sub Buttons_Click Dim btn As Button Dim row As Int btn = Sender row = btn.Tag End Sub
nibbo Active Member Licensed User Longtime User Jun 11, 2014 #3 Excellent, many thanks Klaus. Upvote 0