Jump to content
Sign in to follow this  
Grax

Limiting Editing of ComboBox

Recommended Posts

Grax

I've populated a combo box with the necessary options to select from. Is there any way to may it so the user can selected any of the options but can not modify them, which effectively creates a new one?

Thanks,

Andrew

Share this post


Link to post
Share on other sites
Monamo

I've populated a combo box with the necessary options to select from. Is there any way to may it so the user can selected any of the options but can not modify them, which effectively creates a new one?

Thanks,

Andrew

for the "style" parameter, use:

$CBS_DROPDOWNLIST


- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites
Grax

Problem, this options doesn't allow you to scroll through all the options. One of my lists is nearly 100 long.

Thanks in Advance,

Andrew

Share this post


Link to post
Share on other sites
Monamo

Problem, this options doesn't allow you to scroll through all the options. One of my lists is nearly 100 long.

Thanks in Advance,

Andrew

Can't remember to whom the credit for this method goes, but this example should take care of it:

$combo = GUICtrlCreateCombo("", 25, 225, 217, 25, BitOR($CBS_DROPDOWNLIST, $WS_VSCROLL))
GUICtrlSendMsg($combo,$CB_SETMINVISIBLE,15,0)

And just change out $combo with your combobox's variable

Edited by Monamo

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites
Grax

Can't remember to whom the credit for this method goes, but this example should take care of it:

$combo = GUICtrlCreateCombo("", 25, 225, 217, 25, BitOR($CBS_DROPDOWNLIST, $WS_VSCROLL))
GUICtrlSendMsg($combo,$CB_SETMINVISIBLE,15,0)

And just change out $combo with your combobox's variable

This sets the drop down window size (Length), but it still doesn't allow scrolling. Setting to 100 or so is not practical.

Andrew

Share this post


Link to post
Share on other sites
Grax

This sets the drop down window size (Length), but it still doesn't allow scrolling. Setting to 100 or so is not practical.

Andrew

Nevermind... I missed part of the code. Works great! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.