home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / shareware / autoit-v3-setup.exe / Examples / Helpfile / _GUICtrlListGetLocale.au3 < prev    next >
Encoding:
Text File  |  2006-06-17  |  756 b   |  28 lines

  1. #include <GUIConstants.au3>
  2. #include <GuiList.au3>
  3.  
  4. Opt ('MustDeclareVars', 1)
  5.  
  6. Dim $msg, $ret, $listbox, $button
  7.  
  8. GUICreate("ListBox Get Locale Demo", 400, 250, -1, -1)
  9. $listbox = GUICtrlCreateList("", 125, 40, 180, 120)
  10. GUICtrlSetData($listbox, "test1|more testing|even more testing|demo|test2|test3|test4|test5|test6|test7|test8|test9|test10")
  11. $button = GUICtrlCreateButton('Get Locale', 150, 160, 120, 40)
  12.  
  13. GUISetState()
  14. While 1
  15.     $msg = GUIGetMsg()
  16.     Select
  17.         Case $msg = $GUI_EVENT_CLOSE
  18.             ExitLoop
  19.         Case $msg = $button
  20.             $ret = _GUICtrlListGetLocale ($listbox)
  21.             If ($ret == $LB_ERR) Then
  22.                 MsgBox(16, "Error", "Unknown error from _GUICtrlListGetLocale")
  23.             Else
  24.                 MsgBox(0, "Locale", $ret)
  25.             EndIf
  26.     EndSelect
  27. WEnd
  28.