Sign in to follow this  
Followers 0
Paulie

Readonly ComboBox

4 posts in this topic

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

Share this post


Link to post
Share on other sites



Hello,

try to set the combobox style to $CBS_DROPDOWNLIST.

ciao

Xandl

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thank you ver ver ver much :)

Edited by Paulie

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  
Followers 0