gcue Posted July 7, 2010 Share Posted July 7, 2010 (edited) i got the vertical scroll to work but cant seem to get the horizontal scroll there might be a requirement before getting the Hscroll to work.. thought it might be the border.. but cant find the requirement in help file. BitOR($CBS_DROPDOWNLIST, $WS_BORDER, $WS_HSCROLL, $WS_VSCROLL) Edited July 7, 2010 by gcue Link to comment Share on other sites More sharing options...
Authenticity Posted July 7, 2010 Share Posted July 7, 2010 expandcollapse popup#include <GUIComboBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $msg, $sItems, $tSize Local $hGUI, $hDC $hGUI = GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo("Itemmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm1", 10, 10, 160, 23, _ BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $WS_VSCROLL, $WS_HSCROLL)) ; create first item For $i = 2 To 100 $sItems &= "|Itemmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm" & $i Next GUICtrlSetData(-1, StringTrimLeft($sItems, 1)) ; add other items $hDC = _WinAPI_GetDC($hGUI) $tSize = _WinAPI_GetTextExtentPoint32($hDC, "Itemmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm100") _WinAPI_ReleaseDC($hGUI, $hDC) ; Set to biggest string length in pixel minus the control width GUICtrlSendMsg(-1, $CB_SETHORIZONTALEXTENT, DllStructGetData($tSize, "x")-160, 0) GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd EndFunc ;==>Example Link to comment Share on other sites More sharing options...
gcue Posted July 7, 2010 Author Share Posted July 7, 2010 wow thats complex! thanks for your help Authenticity Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 7, 2010 Share Posted July 7, 2010 (edited) Maybe send it a window message to set CB_SETHORIZONTALEXTENT, and ensure the CBS_DISABLENOSCROLL style is cleared.Edit: Authenticity whooped it already. Doh! Edited July 7, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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