Fzarada Posted February 2, 2009 Share Posted February 2, 2009 Hi all, I'm having a problem listing more than 50 items in a ListBox using GUICtrlCreateList. And I think the same limitation applies to ComboBox. Is there a way to overcome this? Thank you in advance. Link to comment Share on other sites More sharing options...
KaFu Posted February 2, 2009 Share Posted February 2, 2009 Can't reproduce. Use GuiCtrlSetData() to add values. Tweaked from helpfile: expandcollapse popup#include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $MESSAGE = "The following buttons have been clicked" Local $add, $clear, $mylist, $close, $msg GUICreate("My GUI list") ; will create a dialog box that when displayed is centered $add = GUICtrlCreateButton("Add", 64, 32, 75, 25) $clear = GUICtrlCreateButton("Clear", 64, 72, 75, 25) $mylist = GUICtrlCreateList("buttons that have been clicked", 176, 32, 121, 97) GUICtrlSetLimit(-1, 200) ; to limit horizontal scrolling GUICtrlSetData(-1, $MESSAGE) for $i = 0 to 100 GUICtrlSetData(-1, $i) Next $close = GUICtrlCreateButton("my closing button", 64, 160, 175, 25) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $add GUICtrlSetData($mylist, "You clicked button No1|") Case $msg = $clear GUICtrlSetData($mylist, "") Case $msg = $close MsgBox(0, "", "the closing button has been clicked", 2) Exit EndSelect WEnd EndFunc ;==>Example OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) 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