shawnmstout Posted July 25, 2009 Posted July 25, 2009 I know how to Populate going downwards but how do i populate the listbox going across?
GEOSoft Posted July 25, 2009 Posted July 25, 2009 I know how to Populate going downwards but how do i populate the listbox going across?@shawnmstoutHave you not learned yet to post code you have tried?Just from the very worthless description of what you want to do, I suspect that you mean a ListView (multi-column) and not a List (single-column). There are examples in the Help file and there is also a very good ListView UDF that also includes examples in the help file. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
shawnmstout Posted July 25, 2009 Author Posted July 25, 2009 (edited) @shawnmstoutHave you not learned yet to post code you have tried?Just from the very worthless description of what you want to do, I suspect that you mean a ListView (multi-column) and not a List (single-column). There are examples in the Help file and there is also a very good ListView UDF that also includes examples in the help file.sorry man, this is my first attempt at making a listbox so im quite new to this, like 10 minutes ago new, and its hard to look through the help file when you dont know exactly what your looking for.Where do i find the ListView UDF at?i know my code is a mess cause i was taking it from tray menus which i ended up maxing out, but here is what i got so far Edited July 25, 2009 by shawnmstout
shawnmstout Posted July 25, 2009 Author Posted July 25, 2009 (edited) attached test.au3 im simply trying to make a table with headers telling what the data is, and filling in the section below Here is an example of how i wanted it to show -----------------------------------------Drive #1------------------------------------ Label | Drive | FileSystem | Serial Number | Free Space | Total Space | data | data | data | data | data | data | -----------------------------------------Drive #2----------------------------------- Label | Drive | FileSystem | Serial Number | Free Space | Total Space | data | data | data | data | data | data | where the data is, is where the information goes, drive numbers = Header next row = Column Titles next row = data hope this clarifies it, the reason why i chose listboxes is so you can scroll, if this isnt the best approach, please advicetest.au3 Edited July 25, 2009 by shawnmstout
GEOSoft Posted July 25, 2009 Posted July 25, 2009 (edited) sorry man, this is my first attempt at making a listbox so im quite new to this, like 10 minutes ago new, and its hard to look through the help file when you dont know exactly what your looking for.Where do i find the ListView UDF at?i know my code is a mess cause i was taking it from tray menus which i ended up maxing out, but here is what i got so farOkay, you didn't post or attach what you have so far so take a look in the help file >> User Defined Functions Reference >> GUIListViewManagement for the functions and examples. The UDF itself is in the Include folder created when you installed AutoIt.Edit: I also should have pointed out that you may not evnen need the ListView UDF functionality. First look in the Help file >> Function Reference >> GUI management >> GUI Control Creation Then look for GUICtrlCreateListview() and GUICtrlCreateListViewItem() Edited July 25, 2009 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
shawnmstout Posted July 25, 2009 Author Posted July 25, 2009 Okay, you didn't post or attach what you have so far so take a look in the help file >> User Defined Functions Reference >> GUIListViewManagement for the functions and examples. The UDF itself is in the Include folder created when you installed AutoIt.Edit: I also should have pointed out that you may not evnen need the ListView UDF functionality. First look in the Help file >> Function Reference >> GUI management >> GUI Control Creation Then look for GUICtrlCreateListview() and GUICtrlCreateListViewItem()Thanks for Pointing Me in the Right Direction
GEOSoft Posted July 25, 2009 Posted July 25, 2009 You also get the scroll ability with ListView Controls if The list exceeds the height of the control. GUICreate("Test GUI", 700, 400) $ListView = GUICtrlCreateListView("Label | Drive | FileSystem | Serial Number | " & _ "Free Space | Total Space ", 10, 10, 600, 80) $aDrives = DriveGetDrive("All") For $i = 1 To Ubound($aDrives) -1 $sData = DriveGetLabel($aDrives[$i]) & "|" & StringUpper($aDrives[$i]) & "|" $sData &= DriveGetFileSystem($aDrives[$i]) & "|" & DriveGetSerial($aDrives[$i]) & "|" $sData &= DriveSpaceFree($aDrives[$i]) & "|" & DriveSpaceTotal($aDrives[$i]) GUICtrlCreateListViewItem($sData, $ListView) Next GUISetState() While 1 If GUIGetMsg() = -3 Then Exit Wend If you need to set the column widths then see _GUICtrlListView_SetColumnWidth() in the UDF section I pointed you to. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
shawnmstout Posted July 25, 2009 Author Posted July 25, 2009 Here is what i got so far, i posted another topic in the main channel, im definitely doing something wrongtest.au3
GEOSoft Posted July 25, 2009 Posted July 25, 2009 Here is what i got so far, i posted another topic in the main channel, im definitely doing something wrongI see you paid attention to the part where I said you may not need the UDF. Take a look at the code I posted. See any differences? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
shawnmstout Posted July 25, 2009 Author Posted July 25, 2009 I see you paid attention to the part where I said you may not need the UDF. Take a look at the code I posted. See any differences?that would work but its not putting the data into columns so if the field is alot bigger than the title then its not going to align correctly
shawnmstout Posted July 25, 2009 Author Posted July 25, 2009 (edited) that would work but its not putting the data into columns so if the field is alot bigger than the title then its not going to align correctlyno i was wrong, how does | tell it its the next column?that is so much easier Edited July 25, 2009 by shawnmstout
Authenticity Posted July 25, 2009 Posted July 25, 2009 GUICtrlSetData. Read the description carefully as well as the remarks.
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