GetGadgetItemAttribute() returning wrong value

Windows specific forum
User avatar
TI-994A
Addict
Addict
Posts: 2700
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: GetGadgetItemAttribute() returning wrong value

Post by TI-994A »

collectordave wrote:Counting Columns in listicon

Can you use

Code: Select all

  ColCount = 0
  While GetGadgetItemText(0,-1,ColCount) <> ""  ;Checks header text assumes all headers have some text
    ColCount + 1                                             ; count the columns
  Wend
Apparently so, as demonstrated in this working example by Kiffi:

> count colums in a listicongadget
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
TI-994A
Addict
Addict
Posts: 2700
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: GetGadgetItemAttribute() returning wrong value

Post by TI-994A »

collectordave wrote:Just noticed a funny thing while removing columns I was using

Code: Select all

  For iloop = 1 To ColCount   ;Do not remove column 0
    RemoveGadgetColumn(lstResult, iloop)
  Next
Which left a couple of columns each time...
It should be:

Code: Select all

  For iloop = 1 To ColCount
    RemoveGadgetColumn(lstResult, 1)
  Next
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
Post Reply