Page 1 of 1

Posted: Thu Jan 23, 2003 10:40 pm
by BackupUser
Restored from previous forum. Originally posted by lee__48.

Help Required:

I can add an item to a ListIconGadget() using AddGadgetColumn(), but how do I remove it?

RemoveGadgetItem() doesn't work, and there is no RemoveGadgetColumn() command!

Cheers,
Lee.

Posted: Thu Jan 23, 2003 11:00 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.

if you want to remove a column you can do it like this:

Code: Select all

SendMessage_(GadgetID(#YOUR_GADGET), #LVM_DELETECOLUMN, YourColumn, 0)
; where YourColumn is the column you want to delete.
; columns start at 0 for the first column.

Posted: Fri Jan 24, 2003 4:38 pm
by BackupUser
Restored from previous forum. Originally posted by lee__48.
Originally posted by Pupil

if you want to remove a column you can do it like this:

Code: Select all

SendMessage_(GadgetID(#YOUR_GADGET), #LVM_DELETECOLUMN, YourColumn, 0)
; where YourColumn is the column you want to delete.
; columns start at 0 for the first column.
That works a treat! Thanks a lot for your help. :)
Lee.

Posted: Sun Feb 09, 2003 12:10 pm
by BackupUser
Restored from previous forum. Originally posted by Fullernator.

While on the subject of the ListIconGadget(), I can only seem to add values to the first column... how do you add stuff to the other columsn you create?

Posted: Sun Feb 09, 2003 1:30 pm
by BackupUser
Restored from previous forum. Originally posted by fred.

By using the Chr(10) separator

a$= "first column"+chr(10)+"second one"

Fred - AlphaSND

Posted: Sun Mar 23, 2003 1:20 pm
by BackupUser
Restored from previous forum. Originally posted by bpbig.

Help Required:

I can add an item to a ListIconGadget() using AddGadgetColumn(), but how do I resize the column width? and how do I change the label text?

Posted: Sun Mar 23, 2003 1:45 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.

Check the API messages:
#LVM_SETCOLUMNWIDTH
#LVM_SETCOLUMN

example to set the column width:

Code: Select all

SendMessage_(GadgetID(#YourGadget), #LVM_SETCOLUMNWIDTH, YourColumn, #LVSCW_AUTOSIZE)
; autosize the column to fit the largest item in list
; if you want to set a specific width exchange the
; constant #LVSCW_AUTOSIZE with the width you want.