Jump to content

Readonly ComboBox


Paulie
 Share

Recommended Posts

I've tried all I can think of, but i can't figure out how to make a combobox Readonly

Such that you must select an item from the list, and aren't able to type items manually.

I tried using "$ES_READONLY" but as expected, it didn't work.

Help plz :)

ty

Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <ComboConstants.au3> 
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 233, 57, 193, 125)
$Combo1 = GUICtrlCreateCombo("Parts", 8, 8, 217, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData (-1, "Parts 1|Parts 2|Parts 3")
$Label1 = GUICtrlCreateLabel("Label1", 8, 32, 220, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Combo1
            GUICtrlSetData ($Label1, "You have selected '" &GUICtrlRead ($Combo1)&"'")
    EndSwitch
WEnd

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