How to read a ListIcon gadget

Just starting out? Need help? Post your questions and find answers here.
User avatar
RBart
User
User
Posts: 42
Joined: Sun May 04, 2025 11:18 am

How to read a ListIcon gadget

Post by RBart »

Hi,

I have a ListIcon gadget with data from a database.
I want to read the selected item, if possible a specific column.

I got the index, but the text gives me an empty result.

Code: Select all

 frmklanten_lstKlanten_index.i = GetGadgetState(#frmKlanten_lstKlanten)
  frmklanten_lstKlanten_select.s = GetGadgetItemText(#frmKlanten_lstKlanten,frmklanten_lstKlanten_index)
  MessageRequester("lst",frmklanten_lstKlanten_select,#PB_MessageRequester_Info)
Many thanks in advance,
Rudi
💻 Exploring the world of PureBasic
User avatar
mk-soft
Always Here
Always Here
Posts: 6602
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: How to read a ListIcon gadget

Post by mk-soft »

See PB Help.

You must specify the column (optional parameter)
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
User avatar
RBart
User
User
Posts: 42
Joined: Sun May 04, 2025 11:18 am

Re: How to read a ListIcon gadget

Post by RBart »

got it.
The first column (default) was empty.

Thanks mk-soft

Greetings,
Rudi
💻 Exploring the world of PureBasic
Post Reply