Sign in to follow this  
Followers 0
matthewst

GUICtrlRead problem

3 posts in this topic

I can get the msgbox display the selection from box 1 or box 2 but not from both

$Combo1 = GUICtrlCreateCombo("", 10, 10, 200, 240, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL,$WS_GROUP))
GUICtrlSetTip(-1, "Select the building with the emergency")
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
GUICtrlSetData(-1, "1|2|3|4|5")

$Combo2 = GUICtrlCreateCombo("", 10, 40, 200, 240, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL,$WS_GROUP))
GUICtrlSetTip(-1, "Select the building with the emergency")
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
GUICtrlSetData(-1, "1|2|3|4|5")

$ok1 = GUICtrlCreateButton ("OK",  25, 70, 50)
GUICtrlSetOnEvent(-1, "OKPressed")
GUICtrlCreateButton ( "Cancel",  140, 70, 60)

GUISetState(@SW_SHOW)
$win_pos = WinGetPos($Gui)
$tmp_pos = $win_pos

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
    EndSelect
Wend

Func OKPressed()
    msgbox(0,"box name", GUICtrlRead($Combo1))
EndFunc

Share this post


Link to post
Share on other sites



I can get the msgbox display the selection from box 1 or box 2 but not from both

Func OKPressed()
    msgbox(0,"box name", GUICtrlRead($Combo1)& @CRLF & GUICtrlRead($Combo2))
EndFunc

Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

SWEEEET!!!!!!!!!

thanks hardcopy

Edited by matthewst

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