Jump to content

Recommended Posts

Posted

How could I create a ComboBox that is ENABLED, but the user can not write values into that Combo, just select values?

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Posted

Use the $CBS_DROPDOWNLIST style attribute.

It is not what I wos looking for!

With the style you suggested, you still can write into the comboBox!

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Posted

Post your code for creating the combo box. Just because you can't get it to work doesn't mean its wrong. I've used $CBS_DROPDOWNLIST hundreds of times. You should have something similar to this:

$cbFlag = GUICtrlCreateCombo("Boolean", 72, 152, 265, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1,"Array of matches|Array of matches including full match|Array of global matches|Array of global matches including full match","Array of global matches")
  • Moderators
Posted

Maybe $ES_READONLY

Not for a combobox, unless maybe you got the edit controls handle/id. zorphnog gave the OP what he is supposed to use for what they asked for.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Post your code for creating the combo box. Just because you can't get it to work doesn't mean its wrong. I've used $CBS_DROPDOWNLIST hundreds of times. You should have something similar to this:

$cbFlag = GUICtrlCreateCombo("Boolean", 72, 152, 265, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1,"Array of matches|Array of matches including full match|Array of global matches|Array of global matches including full match","Array of global matches")
I used only the CBS_DROPDOWNLIST.....now it works! Thank you!

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Posted

It is not what I wos looking for!

With the style you suggested, you still can write into the comboBox!

!!!OMG!!! !!!Make sure you're using it correctly!!! (exclamation points don't need to be applied to every sentence)

Example:

#include <GUIConstants.au3>
AutoItSetOption("GUIOnEventMode",1)

$GUITitle = "GUI Template"
$GUIWidth = 120
$GUIHeight = 50

$GUI = GUICreate($GUITitle,$GUIWidth,$GUIHeight,(@DesktopWidth-$GUIWidth)/2,(@DesktopHeight - $GUIHeight)/2)
$combo = GUICtrlCreateCombo("",10,10,100,20,$CBS_DROPDOWNLIST)
GUICtrlSetData($combo,"Item 1|Item 2|Item 3")
GUISetState()

#Region Events list
GUISetOnEvent($GUI_EVENT_CLOSE,"_ExitIt")
#EndRegion Events list

While 1
    Sleep(10)
WEnd


Func _ExitIt()
    Exit
EndFunc

- 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]

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
×
×
  • Create New...