Jump to content

How to increase the vertical length of drop down list items in list box?


Recommended Posts

I need to make a list of all country extensions but Koda limits the list of items...

I've tried every setting, docking ect...the drop down only shows about 25% of what I inputed into the "Items" box, fiddled around with "index" but still no change.

But it limits my list and not all items are showing? How can I set it so it displays every items on the list?

Is there a way to set this up in Koda or do I have to do it manually in Scite?

#include 
#include 
#include 
#include 
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 602, 442, 192, 114)
$Combo1 = GUICtrlCreateCombo("Combo1", 192, 1000, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetResizing(-1, $GUI_DOCKAUTO+$GUI_DOCKHEIGHT)
$Button1 = GUICtrlCreateButton("Button1", 424, 248, 75, 25)
$Combo2 = GUICtrlCreateCombo("Combo2", 248, 248, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, ".ac Top-level domain name for an educational network (same as .edu).|.ad Andorra|.ae United Arab Emirates|.af Afghanistan|.ag Antigua and Barbuda|.ai Anguilla|.al Albania|.am Armenia|.an Netherlands Antilles|.ao Angola|.aq Antarctica|.ar Argentina|.as American Samoa|.at Austria|.au Australia|.aw Aruba|.az Azerbaijan|.ba Bosnia/Herzegovinia|.bb Barbados|.bd Bangladesh|.be Belgium|.bf Burkina Faso|.bg Bulgaria|.bh Bahrain|.bi Burundi|.bj Benin|.bm Bermuda|.bn Brunei Darussalam|.bo Bolivia|.br Brazil|.bs Bahamas|.bt Bhutan|.bv Bouvet Island|.bw Botswana|.by 1. Belarus 2. Byelorussia|.bz Belize|.ca Canada|.cc Cocos Islands - Keelings|.cf Central African Republic|.cg Congo|.ch Switzerland|.ci Cote D’Ivoire, or Ivory Coast|.ck Cook Islands|.cl Chile|.cm Cameroon|.cn China|.co Colombia|.cr Costa Rica|.cs Czechoslovakia (former)|.cu Cuba|.cv Cape Verde|.cx Christmas Island|.cy Cyprus|.cz Czech Republic|.de Germany|.dj Djibouti|.dk Denmark|.dm Dominica|.do Dominican Republic|.dz Algeria|.ec Ecuador|.ee Estonia|.eg Egypt|.eh Western Sahara|.er Eritrea|.es Spain|.et Ethiopia|.eu European Union|.fi Finland|.fj Fiji|.fk Falkland Islands/Malvinas|.fm Micronesia|.fo Faroe Islands|.fr France|.fx Metropolitan France|.ga Gabon|.gb Great Britain|.gd Grenada|.ge Georgia|.gf French Guiana|.gh Ghana|.gi Gibraltar|.gl Greenland|.gm Gambia|.gn Guinea|.gp Guadeloupe|.gq Equatorial Guinea|.gr Greece|.gs South Georgia and South Sandwich Islands|.gt Guatemala|.gu Guam|.gw Guinea-Bissau|.gy Guyana|.hk Hong Kong|.hm Heard and McDonald Islands|.hn Honduras|.hr Croatia/Hrvatska|.ht Haiti|.hu Hungary|.id Indonesia|.ie Ireland|.il Israel|.in India|.io British Indian Ocean Territory|.iq Iraq|.ir Iran|.is Iceland|.it Italy|.jm Jamaica|.jo Jordan|.jp Japan|.ke Kenya|.kg Kyrgyzstan|.kh Cambodia|.ki Kiribati|.km Comoros|.kn Saint Kitts and Nevis|.kp North Korea|.kr South Korea|.kw Kuwait|.ky Cayman Islands|.kz Kazakhstan|.la Laos|.lb Lebanon|.lc Saint Lucia|.li Liechtenstein|.lk Sri Lanka|.lr Liberia|.ls Lesotho|.lt Lithuania|.lu Luxembourg|.lv Latvia|.ly Libya|.ma Morocco|.mc Monaco|.md Moldova|.mg Madagascar|.mh Marshall Islands|.mk Macedonia|.ml Mali|.mm Myanmar|.mn Mongolia|.mo Macau|.mp Northern Mariana Islands|.mq Martinique|.mr Mauritania|.ms Montserrat|.mt Malta|.mu Mauritius|.mv Maldives|.mw Malawi|.mx Mexico|.my Malaysia|.mz Mozambique|.na Namibia|.nc New Caledonia|.ne Niger|.nf Norfolk Island|.ng Nigeria|.ni Nicaragua|.nl Netherlands|.no Norway|.np Nepal|.nr Nauru|.nt Neutral Zone|.nu Niue|.nz New Zealand (Aotearoa)|.om Oman|.pa Panama|.pe Peru|.pf French Polynesia|.pg Papua New Guinea|.ph Philippines|.pk Pakistan|.pl Poland|.pm St. Pierre and Miquelon|.pn Pitcairn|.pr Puerto Rico|.pt Portugal|.pw Palau|.py Paraguay|.qa Qatar|.re Reunion|.ro Romania|.ru Russian Federation|.rw Rwanda|.sa Saudi Arabia|.sb Solomon Islands|.sc Seychelles|.sd Sudan|.se Sweden|.sg Singapore|.sh Saint Helena|.si Slovenia|.sj Svalbard and Jan Mayen Islands|.sk Slovakia|.sl Sierra Leone|.sm San Marino|.sn Senegal|.so Somalia|.sr Suriname|.st Sao Torme and Principe|.su Former USSR|.sv El Salvador|.sy Syria|.sz Swaziland|.tc Turks and Caicos Islands|.td Chad|.tf French Southern Territory|.tg Togo|.th Thailand|.tj Tajikistan|.tk Tokelau|.tm Turkmenistan|.tn Tunisia|.to Tonga|.tp East Timor|.tr Turkey|.tt Trinidad and Tobago|.tv Tuvalu|.tw Taiwan|.tz Tanzania|.ua Ukraine|.ug Uganda|.uk United Kingdom|.um U.S. Minor Outlying Islands|.us United States|.uy Uruguay|.uz Uzbekistan|.va Vatican City State|.vc Saint Vincent and the Grenadines|.ve Venezuela|.vg British Virgin Islands|.vi U.S. Virgin Islands|.vn Viet Nam|.vu Vanuatu|.wf Wallis and Futuna Islands|.ws Samoa|.ye Yemen|.yt Mayotte|.yu Yugoslavia|.za South Africa|.zm Zambia|.zr Zaire|.zw Zimbabwe ")
GUICtrlSetResizing(-1, $GUI_DOCKAUTO+$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

Thanks

Link to post
Share on other sites

Your style setting for the combo boxes are eliminating the scroll bar by not including the $WS_VSCROLL setting, so no scroll bar, only show what is able to show on the screen. You'd be better off not setting the style at all on the combo.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites

Hi Brewman,

Perfect answer!

I wasn't aware of the Styles tab, this ressembles HTML/CSS forms that I'm more familiar with ;)

Everytime I need to see the script pop up I have to close Koda.

Can I remodify the GUI by repasting the code in Koda for editing?

Is there a way to keep Koda and Scite open simultaneously so I can see changes in real time and then fix it in Koda?

Thanks

Link to post
Share on other sites

Koda is useful for placement of items in a GUI, to actually make this GUI work you have to modify what you're given from it most of the time. I rarely use Koda myself to create a GUI, usually when it has a lot of items on it that I might need to move around to see how it looks. I usually create the form myself, because then I have a much better grasp of how it's created and what everything is doing in it.

Learn to code without the crutch, it might take a bit longer to get everything placed where you want it, but you'll learn a LOT more about what you're doing and how everything works if you do it yourself. Just a bit of advice, feel free to take it for what it's worth. :)

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...