TwisterWare Posted January 24, 2007 Share Posted January 24, 2007 (edited) Hi, **FIXED IT ** $lstResults = GuiCtrlCreateList("", 140, 100, 240, 175,$WS_BORDER + $WS_VSCROLL) I've created a very simple GUI with; GuiCreate("myApp Tester v1.00", 390, 286,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Group_1 = GuiCtrlCreateGroup("Output Filename", 10, 10, 370, 50) $txtFilename = GuiCtrlCreateInput("c:\myApp\TestResults.txt", 20, 30, 350, 20) $cmdRun = GuiCtrlCreateButton("Run Test Script", 10, 100, 120, 40) $lstResults = GuiCtrlCreateList("", 140, 100, 240, 175,-1) but when I add items to the $lstResults with; GUICtrlSetData($lstResults,"") GUICtrlSetData($lstResults,"a") GUICtrlSetData($lstResults,"r") GUICtrlSetData($lstResults,"c") GUICtrlSetData($lstResults,"t") GUICtrlSetData($lstResults,"z") GUICtrlSetData($lstResults,"e") the list box is sorted. I haven't told the style to be $LBS_SORT though???!! (btw: when I ran this code example for the first time, it wasn't sorted, but now, each time I run it, it is always sorted) any ideas? thanks, Phil. Edited January 24, 2007 by TwisterWare Link to comment Share on other sites More sharing options...
CoePSX Posted January 24, 2007 Share Posted January 24, 2007 Define your own styles to the list control. LBS_SORT is one of the default ones, so if you don't specify a style it'll always be sorted. [quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"]╔══════════════════════════════╗║░░██░░░░░░░░██░░███░░░████░░░█║║░█░░█░░██░░█░░█░█░░█░█░░░░█░█░║║░█░░░░█░░█░████░███░░░██░░░█░░║║░█░░█░█░░█░█░░░░█░░░░░░░█░█░█░║║░░██░░░██░░░██░░█░░░░███░█░░░█║╚══════════════════════════════╝[/font] 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