I'm new to PB and for tutorial purposes I'm creating a simple batch file rename program.
I'm using the gadgets, ExplorerTree and ListIconGadget (for the multiple columns). So far I can navigate via the ExplorerTree gadget and populate the ListIconGadget with a listing of files (filename & date created). There is a third column "New Name" which initially is blank.
My question is, how do a cycle through the items in the ListIconGadget, for the life of me I couldn't find that in the help manual.
Next question, what is the best way to add data to the third column but retaining the same data in columns 1 & 2 (or 0 and 1 to be precise).
Any help appreciated.
ListIconGadget - how to cycle through [Solved]
-
- User
- Posts: 27
- Joined: Mon Oct 01, 2007 1:38 pm
- Location: Melbourne, Australia
- Contact:
ListIconGadget - how to cycle through [Solved]
Last edited by superjacent on Sun Jul 20, 2008 12:48 pm, edited 1 time in total.
milan1612 wrote:2.
Use SetGadgetItemText() with a combination of GetGadgetItemText() + Chr(9) + "Column 3"
Code: Select all
Setgadgetitemtext(#gadget, row, text.s, column)
Addgadgetitem needs chr(9).
PureBasic for Windows
Aye, I never saw this optional argumentMarco2007 wrote:milan1612 wrote:2.
Use SetGadgetItemText() with a combination of GetGadgetItemText() + Chr(9) + "Column 3"should be enough.Code: Select all
Setgadgetitemtext(#gadget, row, text.s, column)
Addgadgetitem needs chr(9).

EDIT:
Sample code for the first problem:
Code: Select all
For i = 0 To CountGadgetItems(#ListIcon) - 1
Debug GetGadgetItemText(#ListIcon, i)
Next
Windows 7 & PureBasic 4.4
-
- User
- Posts: 27
- Joined: Mon Oct 01, 2007 1:38 pm
- Location: Melbourne, Australia
- Contact: