SetGadgetItemAttribute <- What Am I doing wrong

Just starting out? Need help? Post your questions and find answers here.
GenRabbit
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Dec 31, 2014 5:41 pm

SetGadgetItemAttribute <- What Am I doing wrong

Post by GenRabbit »

ListIconGadget(#ListIconGadget1, 20,340,400,240,"Month name",270,#PB_ListIcon_FullRowSelect)
AddGadgetColumn(#ListIconGadget1,2,"Days",100)
SetGadgetItemAttribute(#ListIconGadget1, 1, #PB_ListIcon_ColumnAlignment, #PB_ListIcon_Center)

In my code i have these three lines of code. As I understand it,1 here should center the text in the column Days. But no matter the value here, Month name is the one centered? What Am I doing wrong?
User avatar
STARGÅTE
Addict
Addict
Posts: 2226
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: SetGadgetItemAttribute <- What Am I doing wrong

Post by STARGÅTE »

The second parameter is the item (the row) not the column.
You have to use the last optional parameter column.

Code: Select all

SetGadgetItemAttribute(#ListIconGadget1, #PB_Ignore, #PB_ListIcon_ColumnAlignment, #PB_ListIcon_Center, 1)
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
GenRabbit
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Dec 31, 2014 5:41 pm

Re: SetGadgetItemAttribute <- What Am I doing wrong

Post by GenRabbit »

Thanks, that did it.
Post Reply