Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Listbox Item manipulation?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
lokkut
How do I cheat?
Reputation: 0

Joined: 23 Jan 2015
Posts: 2

PostPosted: Fri Jan 23, 2015 2:56 pm    Post subject: Listbox Item manipulation? Reply with quote

I'm fairly stuck on how to do it, I've been unsuccessful in my searches for a way to do this. How do you remove/add items in a listbox, and how do you find out how many items there in a listbox?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Fri Jan 23, 2015 3:13 pm    Post subject: Reply with quote

assuming that lb is the reference to the listbox (e.g formname.listbox1) then
Code:

lb.Items.Count

returns the number of items in the list

Code:

lb.Items.Add('Bla')

Adds a line with text: Bla

Code:

z=lb.Items[0]

makes z contain the string at index 0 (first item)

Code:

lb.Items[0]="something"

will change the first entry in the listbox to :something

Code:

lb.ItemIndex

returns the currently selected index

Code:

lb.Items.Delete(0)

Deletes the entry with index 0 from the list (top item)

Code:

lb.Items.Insert(1,"inserted line")

Will insert "inserted line" between index 0 and 1 (it becomes index 1)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
lokkut
How do I cheat?
Reputation: 0

Joined: 23 Jan 2015
Posts: 2

PostPosted: Fri Jan 23, 2015 3:16 pm    Post subject: Reply with quote

Thanks for the help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites