PopupMenu.RowTag
From Xojo Documentation
Method
A "hidden" identifier associated with the item identified by the Row parameter. The first row is numbered zero.
Notes
If you want to compare the value of RowTag to another value, you must first convert the value of RowTag to that data type.
Examples
This example populates the RowTag identifier with a sequence number.
Since RowTag is a Variant, you must first convert it to an Integer if you want to compare it to another integer. Do this with a simple assignment statement such as:
Var recID As Integer
recID = ComboBox1.RowTag(1) // ComboBox inherits from PopupMenu so it also inherits the RowTag method
recID = ComboBox1.RowTag(1) // ComboBox inherits from PopupMenu so it also inherits the RowTag method
You can also use the CType function to do an explicit conversion to any other datatype. Then compare recID to another Integer.
Displaying the RowTag of the selected menu item:
TextField1.Value = ComboBox1.RowTag(ComboBox1.SelectedRowIndex)