Deye Posted May 21, 2015 Share Posted May 21, 2015 how can we make the DropDown wait for a full user input selection until HideDropDown is set and not conditioned to a sleep() pauseor is there a way to disable the data reading on hoverexpandcollapse popup#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include<ComboConstants.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 300, 200) ; Create a combobox control. Local $idComboBox = GUICtrlCreateCombo("test", 10, 10, 185, 20, $CBS_DROPDOWNLIST) Local $idClose = GUICtrlCreateButton("Close", 210, 170, 85, 25) Local $idtest = GUICtrlCreateButton("test", 100, 170, 85, 25) ; Add additional items to the combobox. GUICtrlSetData($idComboBox, "Item 1|Item 2|Item 3", "test") ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClose ExitLoop Case $idtest Do ControlCommand($hGUI, "", $idComboBox, "ShowDropDown", "") Sleep(100) Until GUICtrlRead($idComboBox) <> "test" Local $data = GUICtrlRead($idComboBox) MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $data, 0, $hGUI) EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 22, 2015 Moderators Share Posted May 22, 2015 Deye,I would do it like this:Case $idtest _GUICtrlComboBoxEx_ShowDropDown($idComboBox, True) While 1 If GUIGetMsg() = $idComboBox Then ExitLoop Sleep(10) WEnd Local $data = GUICtrlRead($idComboBox) MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $data, 0, $hGUI)Any use?M23 Deye 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Deye Posted May 22, 2015 Author Share Posted May 22, 2015 yea, that's how its done thanks Melba Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now