Jump to content

Limiting Editing of ComboBox


Grax
 Share

Recommended Posts

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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! :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...