Jump to content

Combo list and Scrollbars


5even
 Share

Recommended Posts

I did some search here, and there are tons of links to "combo" and "scrollbars" and even some together, but nothing of what I was looking for. the help file is phenomenal!! the best I've seen so far. I understand that the scrollbars show up after 30 items. but as you can see below, I have a small gui, and would rather have the scrollbars come up earlier for conformity, or even better, only as deep as the listed items up to 10 - 15 items max display

$hCombo = _GUICtrlComboBox_Create($hGUI, "", 120, 50, 125, 150)

everything works fine.. but there is no scrollbars. I've tried various settings(via the help file), but they just make the combo list ugly or messed up.

any suggestions

Edited by 5even
Link to comment
Share on other sites

I did some search here, and there are tons of links to "combo" and "scrollbars" and even some together, but nothing of what I was looking for. the help file is phenomenal!! the best I've seen so far. I understand that the scrollbars show up after 30 items. but as you can see below, I have a small gui, and would rather have the scrollbars come up earlier for conformity, or even better, only as deep as the listed items up to 10 - 15 items max display

$hCombo = _GUICtrlComboBox_Create($hGUI, "", 120, 50, 125, 150)

everything works fine.. but there is no scrollbars. I've tried various settings(via the help file), but they just make the combo list ugly or messed up.

any suggestions

If you have this

$Combo1 = GUICtrlCreateCombo("erty", 280, 88, 40, $Height, BitOR($CBS_DROPDOWNLIST,$WS_VSCROLL))

you will have as many lines drop down as will fit in $height pixels.

You can send a message to a combo to set the no. of iyems which are visible

GUICtrlSendMsg($combo1,$CB_SETMINVISIBLE,12,0);sets 12 items

#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>


#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 93, 125)
$l = GUICtrlCreateLabel("drops = ",10,30,130,20)
$Combo1 = GUICtrlCreateCombo("erty", 280, 88, 40, 80, BitOR($CBS_DROPDOWNLIST,$WS_VSCROLL))
GUICtrlSetData($Combo1, "dgdgagrf drg dgr |adg |adg |dgr |drg d|gr adrg |ftre|dgdgagrf drg dgr |adg |dgr |gr adrg| drg d|gr adrg |dgdgagrf drg dgr |adg |dgr |drg d|gr adrg |dgdgagrf drg dgr |adg |dgr |drg d|gr adrg |dgr drg dgnh|jm df |f g| asef |aef d|g sadf earg ")
$b = GUICtrlCreateButton('up',10,10,120,20)

GUICtrlSendMsg($combo1,$CB_SETMINVISIBLE,8,0)
$ht = 13
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $b
            If $ht > 290 Then $ht = 20
            GUICtrlSetPos($combo1,280,88,95,$ht + 13)
            GUICtrlSetData($l,$ht)
            $ht += 13
    EndSwitch
WEnd
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

GUICtrlSendMsg($combo1,$CB_SETMINVISIBLE,12,0);sets 12 items

that was it right there, ctrlsendmsg would have never crossed my mind while rummange through the help files for a COMBO control

lol

tyvm!!!!!

again

phenominal program!!!!!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...