Champak Posted February 17, 2008 Share Posted February 17, 2008 (edited) This was working fine when I had it in a 1D array, now I get the count in the msgbox, and it writes them out to the console, but it wont populate the list. The array is a 2D + the index numbers. (P.S. Is that 3D or just 2D?) $SongListView = GUICtrlCreateList ("",10,10,440,260,$WS_BORDER+$WS_VSCROLL+$WS_TABSTOP+$LBS_NOTIFY) GUICtrlSetFont(-1, 16, 700, "") MsgBox(0,0,UBound($aSource,1));TEST For $z = 0 To UBound($aSource,1) - 1 GUICtrlSetData($SongListView,StringReplace($aSource[$z][0],@MyDocumentsDir & "\My Music\","")) ConsoleWrite($aSource[$z][0] & @CRLF);TEST Next Edited February 17, 2008 by Champak Link to comment Share on other sites More sharing options...
BrettF Posted February 17, 2008 Share Posted February 17, 2008 #include <GUIConstants.au3> Global $aSource[2][3] $aSource[0][0]="Upper-Left" $aSource[1][0]="Lower-Left" $aSource[0][1]="Upper-Right" $aSource[1][1]="Lower-Right" $aSource[0][2]="Top" $aSource[1][2]="Bottom" $GUI = GUICreate (450, 270) $SongListView = GUICtrlCreateList("", 10, 10, 440, 260, $WS_BORDER + $WS_VSCROLL + $WS_TABSTOP + $LBS_NOTIFY) GUICtrlSetFont(-1, 16, 700, "") MsgBox(0, 0, UBound($aSource, 1));TEST For $z = 0 To UBound($aSource, 1) -1 GUICtrlSetData($SongListView, $aSource[$z][0]) ConsoleWrite($aSource[$z][0] & @CRLF);TEST Next GUISetState (@SW_SHOW) While 1 $nMsg = GUIGetMsg () Switch $nMsg Case -3 Exit EndSwitch WEnd Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Champak Posted February 17, 2008 Author Share Posted February 17, 2008 Thanks for your help, but it turns out that wasn't my problem. An extra blank row was being created at the end of my array; that blank row was causing the data not to set. All fixed now though. 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