dougmoran Posted April 9, 2011 Share Posted April 9, 2011 Good day, folks. I'm new to AutoIt, and definately not an experienced software guy. I'm using AutoIt to build a GUI interface into an RFID system and am having difficulty understanding how to use lists, put display data in them, etc. I included a very simple example below of a GUI that just opens with a list box and displays a count and then closes. When I run the script the list works fine until the count exceeds the size of the box when the scroll bar appears. Then the counts start to write over themselves. I want it to just keep counting down the scroll bar in order. Are there any tutorials you can point me to to help figure this out? GUICreate("My GUI") $mylist=GUICtrlCreateList("", 30, 30, 100, 100) GUISetState(@SW_SHOW) Dim $i=0 While $i < 15 GUICtrlSetData($mylist,$i) $i=$i+1 sleep(1000) Wend Link to comment Share on other sites More sharing options...
somdcomputerguy Posted April 9, 2011 Share Posted April 9, 2011 Actually, this is not to do with the dimensions of the list control, and the items aren't rewriting themselves. When the count ($i) reaches 10, it gets inserted after the 1. I'm sorry I can't really help you here, but what you think is happening, isn't. There is a $LBS_SORT style (which sorts the list alphabetically) defined by default, and I'm not sure how to disable that. Probably by defining another style or styles? - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 9, 2011 Moderators Share Posted April 9, 2011 dougmoran,Welcome to the AutoIt forum. I suggest taking a look at the Setting Styles tutorial in the Wiki. This will show you how to remove the $LBS_SORT style from your ListBox - and a few other things as well. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
somdcomputerguy Posted April 9, 2011 Share Posted April 9, 2011 I'll be taking a look at that too, M23. Thanks. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. 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