Jump to content
Sign in to follow this  


Recommended Posts


Dunno why but combo variants are not selectable. Exausted searching forum, please help if you can. Thank you.

Dont look at includes, as it is only small part of project.

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include <FTPEx.au3>
#include <Resources_udf.au3>
#include <EditConstants.au3>
#include <File.au3>
#include <HyperLinkInGui.au3>
#include <inet.au3>
#include <encoding_udf.au3>
#include <date.au3>
#include <Marquee.au3>
#include <winapi.au3>
#include <GDIPlus.au3>
#include <image_get_info.au3>
#include <array.au3>
#include <GuiEdit.au3>
#include <GuiComboBoxEx.au3>
#include <GuiImageList.au3>
Opt ("GuiOnEventMode", 1)
$mygui = GUICreate("test", 800, 600, 200, 100, BitOR($WS_POPUP, $WS_BORDER))
$button5 = GUICtrlCreateButton("X", 780, 0, 20, 20)
GUICtrlSetOnEvent($button5, "_Close")
    $hcombo = _GUICtrlComboBoxEx_Create($mygui, "", 605, 570, 65, 23, $CBS_DROPDOWNLIST)
    $hImage = _GUIImageList_Create (16, 16, 5, 3)
    For $x = 0 To 146
        _GUIImageList_AddIcon ($hImage, @SystemDir & "\shell32.dll", $x)
    _GUICtrlComboBoxEx_SetImageList ($hCombo, $hImage)
    _GUICtrlComboBoxEx_InitStorage ($hCombo, 150, 300)
    _GUICtrlComboBoxEx_BeginUpdate ($hCombo)
    For $x = 0 To 149
        _GUICtrlComboBoxEx_AddString ($hCombo, "", $x, $x)
    _GUICtrlComboBoxEx_EndUpdate ($hCombo)
Func _messagetogui()
    _SendMessage($mygui, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
EndFunc   ;==>_messagetogui
Func _Close()
EndFunc   ;==>_Close
While 1

Edited by electrico

Share this post

Link to post
Share on other sites

A real brainer I ran into a while ago :graduated:. The control height defined in _GUICtrlComboBoxEx_Create() refers to the height of the drop-down! The actual height of the control is automatically set by the respective font size used (). So use something like this:

$hcombo = _GUICtrlComboBoxEx_Create($mygui, "", 605, 570, 65, 243, $CBS_DROPDOWNLIST)

Share this post

Link to post
Share on other sites

ye, this works. Dont you find it ridicilous? :graduated: Really never could find it without help. Thank you!

Share this post

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.