ListIcon Column : size is useless

Just starting out? Need help? Post your questions and find answers here.
falsam
Posts: 286
Joined: Mon May 05, 2014 9:49 pm
Location: France
Contact:

ListIcon Column : size is useless

Post by falsam »

Code Test

Code: Select all

ExamineDesktops()
OpenWindow(0, 0, 0, 800, 600, "", #PB_Window_ScreenCentered)

;Enter 0, 100, 200, ... The width of the column does not change
ListIconGadget(0, 0, 0, 800, 600, "Col 0",  100, #PB_ListIcon_CheckBoxes | #PB_ListIcon_FullRowSelect)

;AddGadgetColumn(0, 1, "Col 1", 200)
For i = 1 To 10
  AddGadgetItem(0, -1, "Note " + i)
Next
P.S : The Header and the Row Columns doesn't match
http://forums.spiderbasic.com/viewtopic.php?f=11&t=734

➽ Windows 11 - jdk-11.0.2 - SB 3.00 - Android 15
https://falsam.com

Sorry for my poor english
User avatar
T4r4ntul4
Posts: 132
Joined: Wed May 21, 2014 1:57 pm
Location: Netherlands
Contact:

Re: ListIcon Column : size is useless

Post by T4r4ntul4 »

With width in AddGadgetColumn doesnt do much either

Code: Select all

ExamineDesktops()
OpenWindow(0, 0, 0, 800, 600, "", #PB_Window_ScreenCentered)

;Enter 0, 100, 200, ... The width of the column does not change
ListIconGadget(0, 0, 0, 800, 600, "Col 0",  10, #PB_ListIcon_CheckBoxes | #PB_ListIcon_FullRowSelect)

AddGadgetColumn(0,1,"Col 1",10)
AddGadgetColumn(0,2,"Col 2",10)
AddGadgetColumn(0,3,"Col 3",10)
AddGadgetColumn(0,4,"Col 4",10)

;AddGadgetColumn(0, 1, "Col 1", 200)
For i = 1 To 10
  AddGadgetItem(0, -1, "Note " + i)
Next
And a second bug is visible in above code, it shows that the title columns are not the same width as the Note 1 to Note 10 columns.
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: ListIcon Column : size is useless

Post by Fred »

A column can't be smaller than it's title length, and the last column always takes the remaining length. Here is a test code, it seems to work

Code: Select all

OpenWindow(0, 0, 0, 800, 600, "", #PB_Window_ScreenCentered)

ListIconGadget(0, 0, 0, 800, 600, "Col 0",  50, #PB_ListIcon_CheckBoxes | #PB_ListIcon_FullRowSelect)

AddGadgetColumn(0,1,"Col 1",100)
AddGadgetColumn(0,2,"Col 2",200)
AddGadgetColumn(0,3,"Col 3",300)
AddGadgetColumn(0,4,"Col 4",100)

For i = 1 To 10
  AddGadgetItem(0, -1, "Note " + i)
Next
Post Reply