avery Posted February 24, 2009 Share Posted February 24, 2009 In Windows 7, Vista and XP the program looks fine. The two GUICtrlCreateCombo controls display behind the label controls below them in 2000. You hit the dropdown arrow and the items in the dropdown can't be seen -- as if they are a layer deep behind the label controls. I will post my example code. IF someone could please test this on 2000 to confirm my finding. $label_info_1 and $label_info_2 cover up $picker and $picker_class when they are dropped down to display choices. On everything but 2k (so far) it works right. Someone please, please help expandcollapse popupFunc _gui($files, $font, $font_size, $ver, $warning, $set_login, $set_users, $set_wallpaper) #Region ### START Koda GUI section ### Form=F:\Documents\au3\SecurityTool\gui.kxf $gui = GUICreate("Simple Security " & $ver, 746, 320, 374, 198) $label_info_1 = GUICtrlCreateLabel("", 10, 32, 294, 64, $WS_BORDER) GUICtrlSetFont(-1, $font_size, 400, 0, $font) $label_info_2 = GUICtrlCreateLabel("", 312, 32, 306, 65, $WS_BORDER) GUICtrlSetFont(-1, $font_size, 400, 0, $font) $picker = GUICtrlCreateCombo("<<CHOOSE ONE>>", 8, 5, 297, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $files) GUICtrlSetFont(-1, $font_size, 400, 0, $font) $install = GUICtrlCreateButton("Install", 624, 4, 115, 20) $status = GUICtrlCreateEdit("", 8, 104, 729, 169, BitOR($ES_AUTOVSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL)) GUICtrlSetData(-1, "Simple Security version: " & $ver & @CRLF & $warning & @CRLF) GUICtrlSetFont(-1, $font_size, 400, 0, $font) GUICtrlSetBkColor(-1, 0xCCCCCC) $picker_class = GUICtrlCreateCombo("<<CHOOSE ONE>>", 312, 5, 145, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "SECRET|TOP SECRET|CONFIDENTIAL") GUICtrlSetFont(-1, $font_size, 400, 0, $font) $g_config = GUICtrlCreateGroup("Config Options", 624, 26, 113, 72) $cb_wp = GUICtrlCreateCheckbox("Wallpaper", 632, 40, 97, 17) GUICtrlSetState(-1, 1) $cb_ua = GUICtrlCreateCheckbox("Fix Accounts", 632, 76, 97, 17) GUICtrlSetState(-1, 1) $cb_li = GUICtrlCreateCheckbox("Log-in Screen", 632, 58, 97, 17) GUICtrlSetState(-1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $compare = GUICtrlCreateButton("Compare", 464, 4, 75, 25, 0) ;$percent = GUICtrlCreateProgress(8, 280, 730, 17) ; Holds 7 at 730 with 100w $extras_av = GUICtrlCreateButton("Install Anti-Virus", 8, 275, 100, 25) $extras_sdat = GUICtrlCreateButton("Update Anti-Virus", 112, 275, 100, 25) $extras_1 = GUICtrlCreateButton("Reserved", 216, 275, 100, 25) GUICtrlSetState(-1, $GUI_DISABLE) $extras_2 = GUICtrlCreateButton("Reserved", 320, 275, 100, 25) GUICtrlSetState(-1, $GUI_DISABLE) $extras_3 = GUICtrlCreateButton("Reserved", 424, 275, 100, 25) GUICtrlSetState(-1, $GUI_DISABLE) $extras_4 = GUICtrlCreateButton("Reserved", 528, 275, 100, 25) GUICtrlSetState(-1, $GUI_DISABLE) $button_exit = GUICtrlCreateButton("Exit The Program", 632, 275, 105, 25) ;$extras_6 = GUICtrlCreateButton("Update Anti-Virus", 630, 275, 100, 25) ;$extras_7 = GUICtrlCreateButton("Update Anti-Virus", 8, 275, 100, 25) ;$extras_8 = GUICtrlCreateButton("Update Anti-Virus", 8, 275, 100, 25) ;$extras_9 = GUICtrlCreateButton("Update Anti-Virus", 8, 275, 100, 25) ;GUICtrlSetState(-1, $GUI_DISABLE) $backup = GUICtrlCreateButton("Backup", 544, 4, 75, 25, 0) ; ------- File $menu_file = GUICtrlCreateMenu("&File") $menu_clear_status = GUICtrlCreateMenuItem("Clear Screen Status", $menu_file) $menu_master_log = GUICtrlCreateMenuItem("Open Screen Log File", $menu_file) $menu_exit = GUICtrlCreateMenuItem("Exit", $menu_file) ; ------- Edit $menu_edit = GUICtrlCreateMenu("&Edit") GUICtrlSetState(-1, $GUI_DISABLE) ; ------- Evt $menu_evt = GUICtrlCreateMenu("&Event Logs") $menu_evt_backup = GUICtrlCreateMenuItem("Backup Security Log", $menu_evt) $menu_evt_clear = GUICtrlCreateMenuItem("Clear Security Log", $menu_evt) $menu_evt_open_c = GUICtrlCreateMenuItem("Open Current Security Log", $menu_evt) GUICtrlSetState(-1, $GUI_DISABLE) $menu_evt_open_s = GUICtrlCreateMenuItem("Open Saved Security Log", $menu_evt) GUICtrlSetState(-1, $GUI_DISABLE) $menu_evt_status = GUICtrlCreateMenuItem("Status on Security Log", $menu_evt) ; ------- Tools $menu_tools = GUICtrlCreateMenu("&Tools") GUICtrlSetState(-1, $GUI_DISABLE) ; ------- Help $menu_help = GUICtrlCreateMenu("&Help") $menu_about = GUICtrlCreateMenuItem("About", $menu_help) GUISetState(@SW_SHOW) Dim $gui_AccelTable[1][2] = [["!+,", $menu_exit]] GUISetAccelerators($gui_AccelTable) #EndRegion ### END Koda GUI section ### EndFunc ;==>_gui www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org Link to comment Share on other sites More sharing options...
GaryFrost Posted February 24, 2009 Share Posted February 24, 2009 Try changing the height of the combobox to 120. SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
jpm Posted February 24, 2009 Share Posted February 24, 2009 that written in the docUnder Windows XP/2003 Windows will adjust the size of the opened combo. On other Windows versions you can define this size with the "height" parameter if the default value is not BIG enough to contain at least one line. Link to comment Share on other sites More sharing options...
avery Posted February 24, 2009 Author Share Posted February 24, 2009 Thank you very much for the reply. I will not be in a lab with a W2K box until tomorrow sometime. I wish I could test it right now but I have meetings until the end of the day. I bookmarked this thread and will report back on the problem. Again thanks for your time and support. -avery www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org Link to comment Share on other sites More sharing options...
avery Posted March 6, 2009 Author Share Posted March 6, 2009 (edited) OK I finally got a chance to try the changes suggest above. To increase the size to 125. Bad news: It did not fix the glitch. The drop down items are still displayed behind the other controls or are not displayed at all. It is hard to tell. All looks fine on everything beyond WIN_2000. Here is the current code I am using to reproduce the glitch. If anyone can suggest a way around this I would really appericate it. I need to get my app running on 2000 bad. expandcollapse popup; ----------------------------------------------------------------------------- Func _gui($files, $font, $font_size, $ver, $warning, $set_login, $set_users, $set_wallpaper) #Region ### START Koda GUI section ### Form=F:\Documents\au3\SecurityTool\gui.kxf $gui = GUICreate("Simple Security " & $ver, 746, 320, 374, 198) $label_info_1 = GUICtrlCreateLabel("", 10, 32, 294, 64, $WS_BORDER) GUICtrlSetFont(-1, $font_size, 400, 0, $font) $label_info_2 = GUICtrlCreateLabel("", 312, 32, 306, 65, $WS_BORDER) GUICtrlSetFont(-1, $font_size, 400, 0, $font) $picker = GUICtrlCreateCombo("<<CHOOSE ONE>>", 8, 5, 297, 125, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $files) GUICtrlSetFont(-1, $font_size, 400, 0, $font) $install = GUICtrlCreateButton("Install", 624, 4, 115, 20) $status = GUICtrlCreateEdit("", 8, 104, 729, 169, BitOR($ES_AUTOVSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL)) GUICtrlSetData(-1, "Simple Security version: " & $ver & @CRLF & $warning & @CRLF) GUICtrlSetFont(-1, $font_size, 400, 0, $font) GUICtrlSetBkColor(-1, 0xCCCCCC) $picker_class = GUICtrlCreateCombo("<<CHOOSE ONE>>", 312, 5, 145, 125, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "SECRET|TOP SECRET|CONFIDENTIAL") GUICtrlSetFont(-1, $font_size, 400, 0, $font) $g_config = GUICtrlCreateGroup("Config Options", 624, 26, 113, 72) $cb_wp = GUICtrlCreateCheckbox("Wallpaper", 632, 40, 97, 17) GUICtrlSetState(-1, 1) $cb_ua = GUICtrlCreateCheckbox("Fix Accounts", 632, 76, 97, 17) GUICtrlSetState(-1, 0) $cb_li = GUICtrlCreateCheckbox("Log-in Screen", 632, 58, 97, 17) GUICtrlSetState(-1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $compare = GUICtrlCreateButton("Compare", 464, 4, 75, 25, 0) ;$percent = GUICtrlCreateProgress(8, 280, 730, 17) ; Holds 7 at 730 with 100w $extras_av = GUICtrlCreateButton("Install Anti-Virus", 8, 275, 100, 25) $extras_sdat = GUICtrlCreateButton("Update Anti-Virus", 112, 275, 100, 25) ; winaudit.exe to help scan system $extras_winaudit = GUICtrlCreateButton("WinAudit Tool", 216, 275, 100, 25) ;GUICtrlSetState(-1, $GUI_DISABLE) $extras_1 = GUICtrlCreateButton("Reserved", 320, 275, 100, 25) GUICtrlSetState(-1, $GUI_DISABLE) $extras_2 = GUICtrlCreateButton("Reserved", 424, 275, 100, 25) GUICtrlSetState(-1, $GUI_DISABLE) $extras_3 = GUICtrlCreateButton("Reserved", 528, 275, 100, 25) GUICtrlSetState(-1, $GUI_DISABLE) $button_exit = GUICtrlCreateButton("Exit The Program", 632, 275, 105, 25) ;$extras_6 = GUICtrlCreateButton("Update Anti-Virus", 630, 275, 100, 25) ;$extras_7 = GUICtrlCreateButton("Update Anti-Virus", 8, 275, 100, 25) ;$extras_8 = GUICtrlCreateButton("Update Anti-Virus", 8, 275, 100, 25) ;$extras_9 = GUICtrlCreateButton("Update Anti-Virus", 8, 275, 100, 25) ;GUICtrlSetState(-1, $GUI_DISABLE) $backup = GUICtrlCreateButton("Backup", 544, 4, 75, 25, 0) ; ------- File $menu_file = GUICtrlCreateMenu("&File") $menu_clear_status = GUICtrlCreateMenuItem("Clear Screen Status", $menu_file) $menu_master_log = GUICtrlCreateMenuItem("Open Screen Log File", $menu_file) $menu_exit = GUICtrlCreateMenuItem("Exit", $menu_file) ; ------- Edit $menu_edit = GUICtrlCreateMenu("&Edit") GUICtrlSetState(-1, $GUI_DISABLE) ; ------- Evt $menu_evt = GUICtrlCreateMenu("&Event Logs") $menu_evt_backup = GUICtrlCreateMenuItem("Backup Security Log", $menu_evt) $menu_evt_clear = GUICtrlCreateMenuItem("Clear Security Log", $menu_evt) $menu_evt_open_c = GUICtrlCreateMenuItem("Open Current Security Log", $menu_evt) GUICtrlSetState(-1, $GUI_DISABLE) $menu_evt_open_s = GUICtrlCreateMenuItem("Open Saved Security Log", $menu_evt) GUICtrlSetState(-1, $GUI_DISABLE) $menu_evt_status = GUICtrlCreateMenuItem("Status on Security Log", $menu_evt) ; ------- Tools $menu_tools = GUICtrlCreateMenu("&Tools") GUICtrlSetState(-1, $GUI_DISABLE) ; ------- Help $menu_help = GUICtrlCreateMenu("&Help") $menu_about = GUICtrlCreateMenuItem("About", $menu_help) GUISetState(@SW_SHOW) Dim $gui_AccelTable[1][2] = [["!+,", $menu_exit]] GUISetAccelerators($gui_AccelTable) #EndRegion ### END Koda GUI section ### EndFunc ;==>_gui Edited March 6, 2009 by avery www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org Link to comment Share on other sites More sharing options...
avery Posted March 6, 2009 Author Share Posted March 6, 2009 I also tried to resize the labels that are below the dropdown menu's and that did not help either. I also changed the order and created the combo drowndown menu's after the labels and that also did not work on Win_2000. I do not have this issue with checkboxes so should I just convert my application to those so it is support on Win_2000? I am looking for alternate suggestions or any possible solutions to the glitch I seem to have uncovered. Respectfully, Avery www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org Link to comment Share on other sites More sharing options...
ResNullius Posted March 7, 2009 Share Posted March 7, 2009 OK I finally got a chance to try the changes suggest above. To increase the size to 125. Bad news: It did not fix the glitch. The drop down items are still displayed behind the other controls or are not displayed at all. It is hard to tell. All looks fine on everything beyond WIN_2000.I have run your code in Windows 2000 as in your most recent post and have no problem, other than your combos are not scrollable because you overode the default style (See this post: http://www.autoitscript.com/forum/index.ph...t&p=652706) Try replacing your combo creation by dropping the specified style, i.e.: $picker = GUICtrlCreateCombo("<<CHOOSE ONE>>", 8, 5, 297, 125) Other than that, perhaps there is something wrong with the parameters (most probably the "$files" var) that you are passing to the function. If the problem remains after you drop the styles from your combos, then post a sample line that calls your function and I can test with that. Link to comment Share on other sites More sharing options...
avery Posted March 10, 2009 Author Share Posted March 10, 2009 (edited) Thank you very, very much for your help. I was sorta giving up on this but you saved me from falling of the cliff with my au3 endeavors. You gave me an idea, however it did not work, but it did spark me to try some process of elimination to track down the culprit.And It worked! Duh, I can show an ounce of brain power (sometimes). Broken Code $picker = GUICtrlCreateCombo("<<CHOOSE ONE>>", 8, 5, 297, 125, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $files) GUICtrlSetFont(-1, $font_size, 400, 0, $font) Working Code $picker = GUICtrlCreateCombo("<<CHOOSE ONE>>", 8, 5, 297, 125, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $files) ;GUICtrlSetFont(-1, $font_size, 400, 0, $font)Doing the GUICtrlSetFont breaks it. The font can't even be changed on the combo controls from what I understand anyways so no harm done, it still looks the same. All the other styles, extended styles worked fine.I think it might still be a bug since, oh all things, breaking it on those OS'es doesn't be the result. I am just super happy the problem is resolved now.Should I post my findings in a bug thread or should I just let it be? Thanks again for everyone's help.Much Love,Avery Edited March 10, 2009 by avery www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org Link to comment Share on other sites More sharing options...
ResNullius Posted March 12, 2009 Share Posted March 12, 2009 (edited) Thank you very, very much for your help. I was sorta giving up on this but you saved me from falling of the cliff with my au3 endeavors. You gave me an idea, however it did not work, but it did spark me to try some process of elimination to track down the culprit. And It worked! Duh, I can show an ounce of brain power (sometimes). Broken Code $picker = GUICtrlCreateCombo("<<CHOOSE ONE>>", 8, 5, 297, 125, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $files) GUICtrlSetFont(-1, $font_size, 400, 0, $font) Working Code $picker = GUICtrlCreateCombo("<<CHOOSE ONE>>", 8, 5, 297, 125, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData(-1, $files) ;GUICtrlSetFont(-1, $font_size, 400, 0, $font) Doing the GUICtrlSetFont breaks it. The font can't even be changed on the combo controls from what I understand anyways so no harm done, it still looks the same. All the other styles, extended styles worked fine. I think it might still be a bug since, oh all things, breaking it on those OS'es doesn't be the result. I am just super happy the problem is resolved now. Should I post my findings in a bug thread or should I just let it be? Thanks again for everyone's help. Much Love, AveryRunning on Windows 2000 I can set font size on the combos with no problem. Your "broken" code isn't broken for me! Are you running with some kind of alternate/special Windows theme? I just use "Windows Classic". I still suspect there is some other issue causing your problems. Perhaps your calling line for the function contains an error in the font name/size specification? Since you didn't post a calling line, here is what I used: _Gui("1|2|3|4|5|6|7|8|9|10|11|12|13","Arial",8,"2.0","This is a Warning",0,0,0) Does it work as it should if you use that line? Edit: spelinn Edited March 12, 2009 by ResNullius Link to comment Share on other sites More sharing options...
ajbritton Posted July 17, 2009 Share Posted July 17, 2009 I am suffering from a similar problem with Combo controls when running on Win2K. My code ran fine on XP, 2K3 but Combo dropdown did not work on 2K. Just got a black line appearing under the Combo when I clicked the down arrow. I tried the suggestions in the thread and the only thing that helped me was setting the control height to a much larger number. I am not setting font size at all in my code, just using what is generated by Koda for the most part. Working code $cbxApp = GUICtrlCreateCombo("", 128, 16, 153, [b]400[/b], BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$WS_VSCROLL)) Broken code $cbxApp = GUICtrlCreateCombo("", 128, 16, 153, [b]25[/b], BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL,$WS_VSCROLL)) 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