change string in listbox (with API)

Just starting out? Need help? Post your questions and find answers here.
Cor
Enthusiast
Enthusiast
Posts: 124
Joined: Fri Apr 25, 2003 7:52 pm
Location: Netherlands
Contact:

change string in listbox (with API)

Post by Cor »

For learning API.

I want to change a string in a listbox with API

I use the following

Sendmessage_ (#mylistbox,#LB_SETITEMDATA,0,"new string")

But I dont' succeed,

What I'am I doing wrong

I know PB does it with a PB command, but I want to learn API

any suggestions are welcome
Cor de Visser

Registered PureBasic user

Author of ChordPlanet
Made with PureBasic
http://www.chordplanet.com
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

have you tried:

Code: Select all

Sendmessage_ (GadgetID(#mylistbox),#LB_SETITEMDATA,0,"new string")
Cor
Enthusiast
Enthusiast
Posts: 124
Joined: Fri Apr 25, 2003 7:52 pm
Location: Netherlands
Contact:

Post by Cor »

Yes i tried,

Does not work.

Maybe i use the wrong command!!!!!
Cor de Visser

Registered PureBasic user

Author of ChordPlanet
Made with PureBasic
http://www.chordplanet.com
Cor
Enthusiast
Enthusiast
Posts: 124
Joined: Fri Apr 25, 2003 7:52 pm
Location: Netherlands
Contact:

Post by Cor »

Just found out

First delete item with #LB_DELETESTRING with current index then
insert string with #LB_INSERTSTRING
Cor de Visser

Registered PureBasic user

Author of ChordPlanet
Made with PureBasic
http://www.chordplanet.com
Post Reply