Page 1 of 1

Change caption of default column of ListIconGadget

Posted: Tue Aug 07, 2012 8:58 pm
by kpeters58
Hi,

how can I change the caption of the default column of a ListIconGadget?

Thanks,
K

Re: Change caption of default column of ListIconGadget

Posted: Tue Aug 07, 2012 9:21 pm
by MicroByte
use "SetGadgetItemText" with -1 for the row index :D

Re: Change caption of default column of ListIconGadget

Posted: Tue Aug 07, 2012 10:15 pm
by kpeters58
Thanks for that (needs to go into the documentation!)

So does this imply that one cannot assign data to ALL columns (incl. the default one) in one go as I am trying below.
If this were entirely logical (as it should), I'd use

Code: Select all

AddGadgetItem(#ListIconGadget, -1, coldata)
but I cannot use -1 as that is reserved for adding at the end according to the docs........?

Code: Select all

    While NextDatabaseRow(#Database_ID) 
      coldata.s = ""
      For i = 0 To DatabaseColumns(#Database_ID) - 1
        coldata = coldata + Chr(10) + GetDatabaseString(#Database_ID, i)
      Next  
      AddGadgetItem(#ListIconGadget, 0, coldata)
    Wend