Jump to content
Sign in to follow this  
DW1

HowTo?: Read only combo box

Recommended Posts

DW1

How can you make a combo box that a user cannot type into the edit field?

Share this post


Link to post
Share on other sites
mschol

with $CBS_DROPDOWNLIST in $iStyle ?

_GUICtrlComboBox_Create($hWnd, $sText, $iX, $iY[, $iWidth = 100[, $iHeight = 120[, $iStyle = 0x00200042[, $iExStyle = 0x00000000]]]])

$CBS_DROPDOWNLIST - Similar to $CBS_DROPDOWN, except that the edit control is replaced by a static text item that displays the current selection in the list box

and for the default one:

put $CBS_DROPDOWN=1 in the style part of the code:

GUICtrlCreateCombo ( "text", left, top [, width [, height [, style [, exStyle]]]] )

Edited by mschol

Share this post


Link to post
Share on other sites
searchresult

How can you make a combo box that a user cannot type into the edit field?

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 193, 115)
$Combo1 = GUICtrlCreateCombo("", 168, 80, 145, 25,$CBS_DROPDOWNLIST)
GUICtrlSetData($Combo1,"daat|ycx|yxc|yxc")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

try if it helps

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  

×