Inververs Posted September 13, 2015 Share Posted September 13, 2015 Help me please with resizing of _GUICtrlComboBox_Create controlIt should resizing like native Combo withGUICtrlSetResizing($GUI_CMB_LIST, BitOR($GUI_DOCKRIGHT, $GUI_DOCKLEFT, $GUI_DOCKHEIGHT, $GUI_DOCKTOP))Thank you. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 13, 2015 Moderators Share Posted September 13, 2015 Inververs,I usually create an invisible label which has the required resizing parameters and then resize the UDF control to fit it in a WM_SIZE message handler:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3> $hGUI = GUICreate("test", 400, 400, Default, Default, $WS_SIZEBOX) $cLabel = GUICtrlCreateLabel("", 20, 20, 200, 20) ; Label which will adjust with the GUI GUICtrlSetBkColor($cLabel, 0xFFCCCC) GUICtrlSetResizing($cLabel, $GUI_DOCKRIGHT + $GUI_DOCKLEFT + $GUI_DOCKHEIGHT + $GUI_DOCKTOP) $hCombo = _GUICtrlComboBox_Create($hGUI, "", 20, 20, 200) GUISetState() GUIRegisterMsg($WM_SIZE, "_WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam) ; Get label posiition and size and adjust child GUI to fit $aPos = ControlGetPos($hGUI, "", $cLabel) WinMove($hCombo, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3]) EndFuncIncidentally, you should use normal addition for the resizing parameters, not BitOr as with Windows styles.M23 Inververs and mLipok 1 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...
Inververs Posted September 13, 2015 Author Share Posted September 13, 2015 Melba23, it is a good idea, thx.Incidentally, you should use normal addition for the resizing parameters, not BitOr as with Windows styles.got it. Topic is solved, thanks! 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