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.
ListIconGadget() Troubles
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
if you want to remove a column you can do it like this:
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.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by lee__48.

Lee.
That works a treat! Thanks a lot for your help.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.
Lee.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
Check the API messages:
#LVM_SETCOLUMNWIDTH
#LVM_SETCOLUMN
example to set the column width:
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.