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 


Combo box search function?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
dan013
Cheater
Reputation: 0

Joined: 30 Dec 2023
Posts: 26

PostPosted: Sun Feb 18, 2024 5:15 pm    Post subject: Combo box search function? Reply with quote

Is it possible to create search function in combo box that when i type a letter it will show up all the values starting from the letter i type in?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Sun Feb 18, 2024 6:28 pm    Post subject: Reply with quote

Yeah there is:
Code:

if f then f.destroy(); f = nil end

f = createForm(getMainForm())
f.Name = 'frmMain'
f.Caption = 'Main Form'
f.Width = 300
f.Height = 275
f.Position = 'poDesktopCenter'


local combobox = createComboBox(f)
combobox.Width = f.Width - 20
combobox.Height = 27
combobox.Top = 10
combobox.Left = 10

combobox.AutoComplete = true  -- This is the property to set for autocompletion.

combobox.Items[0] = 'Health'
combobox.Items[1] = 'Armour'
combobox.Items[2] = 'Stamina'
combobox.Items[3] = 'Dexterity'
combobox.Items[4] = 'Mana'
combobox.Items[5] = 'Strength'
combobox.Items[6] = 'Luck'
combobox.Items[7] = 'Critical Chance'
combobox.Items[8] = 'Evasion'
combobox.Items[9] = 'Speed'
combobox.ItemIndex = 0
Back to top
View user's profile Send private message
dan013
Cheater
Reputation: 0

Joined: 30 Dec 2023
Posts: 26

PostPosted: Sun Feb 18, 2024 8:01 pm    Post subject: Reply with quote

LeFiXER wrote:
Yeah there is:
Code:

if f then f.destroy(); f = nil end

f = createForm(getMainForm())
f.Name = 'frmMain'
f.Caption = 'Main Form'
f.Width = 300
f.Height = 275
f.Position = 'poDesktopCenter'


local combobox = createComboBox(f)
combobox.Width = f.Width - 20
combobox.Height = 27
combobox.Top = 10
combobox.Left = 10

combobox.AutoComplete = true  -- This is the property to set for autocompletion.

combobox.Items[0] = 'Health'
combobox.Items[1] = 'Armour'
combobox.Items[2] = 'Stamina'
combobox.Items[3] = 'Dexterity'
combobox.Items[4] = 'Mana'
combobox.Items[5] = 'Strength'
combobox.Items[6] = 'Luck'
combobox.Items[7] = 'Critical Chance'
combobox.Items[8] = 'Evasion'
combobox.Items[9] = 'Speed'
combobox.ItemIndex = 0


thanks alot
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