Jewtus Posted June 1, 2015 Share Posted June 1, 2015 (edited) I'm trying to figure out if it is possible to make the dropdown that pops out of the combo box not be limited to the width of the combo box itself. So for example say the combo box is 50 wide and the text is 60 wide, I'd like to show the combobox as 50 wide in the gui, but when I select the dropdown, it sizes the dropdown based on the text in it.I do not want the combo box to change size but I also don't want the text to be editable. I've tried a few various different combinations to try to get this work and they all keep re-sizing the combobox itself.Any suggestions? Edited June 3, 2015 by Jewtus Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 1, 2015 Moderators Share Posted June 1, 2015 Jewtus,Easy - wait for the dropdown to appear and then resize it - this is based on the _GUICtrlComboBox_GetComboBoxInfo example in the Help file:expandcollapse popup#include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Global $g_idMemo Example() Func Example() Local $tInfo, $idCombo ; Create GUI GUICreate("ComboBox Get ComboBox Info", 400, 296) $idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296) $g_idMemo = GUICtrlCreateEdit("", 2, 32, 396, 266, 0) GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New") GUISetState(@SW_SHOW) ; Add files _GUICtrlComboBox_BeginUpdate($idCombo) _GUICtrlComboBox_AddDir($idCombo, @WindowsDir & "\*.exe") _GUICtrlComboBox_EndUpdate($idCombo) If _GUICtrlComboBox_GetComboBoxInfo($idCombo, $tInfo) Then $hCombo = DllStructGetData($tInfo, "hCombo") $hEdit = DllStructGetData($tInfo, "hEdit") $hList = DllStructGetData($tInfo, "hList") EndIf ; Loop until the user exits. Do If _GUICtrlComboBox_GetDroppedState($idCombo) = True Then $aWPos = WinGetPos($hList) WinMove($hList, "", $aWPos[0], $aWPos[1], 500) EndIf Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>ExampleM23 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...
Jewtus Posted June 2, 2015 Author Share Posted June 2, 2015 Not sure I fully understand what is going on here, but I have some other tasks to finish prior to putting these polishes on the GUI. I'll look back at this when I have a bit more time to play with (I was hoping it was an extended style or something). Thanks Melba! Link to comment Share on other sites More sharing options...
KaFu Posted June 2, 2015 Share Posted June 2, 2015 _GUICtrlComboBox_SetDroppedWidth?https://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlComboBox_SetDroppedWidth.htm BrewManNH and Jewtus 2 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 2, 2015 Moderators Share Posted June 2, 2015 KaFu,You got me!M23 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...
Jewtus Posted June 3, 2015 Author Share Posted June 3, 2015 Oh that is perfect! Thanks! Link to comment Share on other sites More sharing options...
Jewtus Posted June 3, 2015 Author Share Posted June 3, 2015 Is there no way to mark posts as solved anymore? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 3, 2015 Moderators Share Posted June 3, 2015 Jewtus,Not in this version of the new forum software. IPS have received a number of requests to restore the functionality, but believe me there are many more pressing problems they need to address first!M23 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...
Jewtus Posted June 3, 2015 Author Share Posted June 3, 2015 Fair enough! I changed the title... that is good enough for me for now. 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