Change caption of default column of ListIconGadget

Just starting out? Need help? Post your questions and find answers here.
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

Change caption of default column of ListIconGadget

Post by kpeters58 »

Hi,

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

Thanks,
K
PB 5.73 on Windows 10 & OS X High Sierra
MicroByte
New User
New User
Posts: 8
Joined: Tue May 08, 2012 11:06 pm

Re: Change caption of default column of ListIconGadget

Post by MicroByte »

use "SetGadgetItemText" with -1 for the row index :D
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

Re: Change caption of default column of ListIconGadget

Post 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
PB 5.73 on Windows 10 & OS X High Sierra
Post Reply