How to find the selected item # in a ListIcon gadget???

Just starting out? Need help? Post your questions and find answers here.
cseymour
User
User
Posts: 29
Joined: Fri Jun 02, 2006 6:39 pm

How to find the selected item # in a ListIcon gadget???

Post by cseymour »

Hi All,
I have a ListIcon gadget that I fill from a database. What I want to do is be able to set the text of a couple of String Gadgets to the currently selected row of the ListIcon. I am struggling trying to get the item number I should use for the GetGadgetItemText() function. I want it to be the current row of the ListIcon gadget.

Any ideas?

Thanks.

Chris
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8452
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

For ListIcons, GetGadgetState() returns the first selected item or -1 if no item is selected.
BERESHEIT
cseymour
User
User
Posts: 29
Joined: Fri Jun 02, 2006 6:39 pm

Post by cseymour »

Thanks netmaestro. That was the ticket. :D

Much appreciated.

Cheers.

Chris
Post Reply