HighGuy Posted January 26, 2005 Share Posted January 26, 2005 (edited) The syntax is GUICtrlCreateCombo ( "text", left, top [, width [, height [, style [, exStyle]]]] ) but the real height of the control seems to be only dependend on what size of font ist used. Is it not possible to create a bigger ComboBox with the given size and center the text vertical? Here is a test script: #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUICtrlCreateButton("Button", 10 , 10 , 50, 50) GUICtrlCreateCombo("", 60 , 10 , 50, 1000) ;_______ very big combo _____________^^^^ GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Edited January 26, 2005 by HighGuy Link to comment Share on other sites More sharing options...
jpm Posted January 26, 2005 Share Posted January 26, 2005 The syntax is GUICtrlCreateCombo ( "text", left, top [, width [, height [, style [, exStyle]]]] )but the real height of the control seems to be only dependend on what size of font ist used. Is it not possible to create a bigger ComboBox with the given size and center the text vertical?Here is a test script:#include <GUIConstants.au3> GUICreate("My GUI"); will create a dialog box that when displayed is centered GUICtrlCreateButton("Button", 10 , 10 , 50, 50) GUICtrlCreateCombo("", 60 , 10 , 50, 1000) ;_______ very big combo _____________^^^^ GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend<{POST_SNAPBACK}>You experience a Windows XP difference from other window.Search in the forum I think you will get from Valik the right view.Windows XP will display the combo as he wants. Link to comment Share on other sites More sharing options...
HighGuy Posted January 27, 2005 Author Share Posted January 27, 2005 I tested a little bit further and found the (my) problem. I assumed that "height" meant the height of the input control with the pull down button, but "height" for combo boxes means height of the complete pull down list! If this is the correct behavior it should be added to the documentation because otherwise it is confusing. Of course this doesn't solve my problem: How can I change the height of the combo box imput line (without changing the font size)? BTW: I'm using my prog on WindowsXP and Windows2000 Terminal Server and get the same height problem. On Windows2000 Terminal Server I encounter another problem: The pull down list is only a small black line of some pixels and no selection is possible. You can only use the up- and down-buttons to choose between the entries . Link to comment Share on other sites More sharing options...
this-is-me Posted January 27, 2005 Share Posted January 27, 2005 The pull down list is only a small black lineSet the height to 80 Who else would I be? Link to comment Share on other sites More sharing options...
HighGuy Posted January 27, 2005 Author Share Posted January 27, 2005 Set the height to 80<{POST_SNAPBACK}>Thanks. Increasing the height value solved the prob with the Terminal Server, but I'm still asking myself why I should define the complete height of the pull down control? Seems that, to achieve my goal, I have to calculate the font size that suits my wanted height. Stupid . Link to comment Share on other sites More sharing options...
jpm Posted January 27, 2005 Share Posted January 27, 2005 Thanks. Increasing the height value solved the prob with the Terminal Server, but I'm still asking myself why I should define the complete height of the pull down control? Seems that, to achieve my goal, I have to calculate the font size that suits my wanted height. StupidĀ .<{POST_SNAPBACK}>You raise a Valid point I will see what I can do from the code and/or the doc Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 28, 2005 Administrators Share Posted January 28, 2005 I for one would hate it if everytime I opened a combo it automatically went to full height. I don't see anything wrong with having to specify some pixel height. Maybe add a -1 option for the height that has a good guess. Deployment Blog:Ā https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Ā https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
HighGuy Posted January 28, 2005 Author Share Posted January 28, 2005 Just a suggestion (NOT a request!) What do you think about a: GUICtrlCreateCombo ( "text", left, top [, width [, height [,entries [, style [, exStyle]]]]] ) width, height: size of the visible input line of the combo, item vertical centered entries: # of list entries shown when opened, with: -1: as much as entries in the list #: if "# < entries in the list", show scroll bar if "# > entries in the list", set "# = entries in the list" If this is to difficult to realize or if I'm writing nonsense then . If so, a better documentation would be fine Link to comment Share on other sites More sharing options...
jpm Posted January 28, 2005 Share Posted January 28, 2005 Just a suggestion (NOT a request!)What do you think about a:GUICtrlCreateCombo ( "text", left, top [, width [, height [,entries [, style [, exStyle]]]]] ) width, height: size of the visible input line of the combo, item vertical centered entries: # of list entries shown when opened, with: -1: as much as entries in the list #: if "# < entries in the list", show scroll bar if "# > entries in the list", set "# = entries in the list"If this is to difficult to realize or if I'm writing nonsense thenĀ . If so, a better documentation would be fine <{POST_SNAPBACK}>I will try to propose something around this size problem. Stay tune Link to comment Share on other sites More sharing options...
jpm Posted January 28, 2005 Share Posted January 28, 2005 I am not able to reproduce you behavior under terminal server 2000. It is working as Windows 2000 (I am using the remote administration not the true terminal server) I will document difference between XP/2003 and other Windows version 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