[6.10 Beta 6] SetGadgetItemAttribute() with #PB_ListIcon_ColumnAlignment

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

User avatar
Shardik
Addict
Addict
Posts: 2059
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

[6.10 Beta 6] SetGadgetItemAttribute() with #PB_ListIcon_ColumnAlignment

Post by Shardik »

According to the english help for SetGadgetItemAttribute() the second parameter should be the item index of the row in a ListIconGadget (-1: header row, 0: index of 1st row). But the given index is not respected. Independant from the given index all cell texts in a column plus header text are right-aligned. In the following example the cell text in the 2nd row and 2nd column should be right-aligned but all cell texts plus header text in the 2nd column are right-aligned (tested on Linux Mint 21.3 x64 'Virginia' with Cinnamon and PB 6.10 x64 Beta 6):

Code: Select all

OpenWindow(0, 200, 100, 410, 130, "Column justification")
ListIconGadget(0, 10, 10, 390, 85, "Name", 100)
AddGadgetColumn(0, 1, "Address", 280)
AddGadgetItem(0, -1, "Harry Rannit" + #LF$ +
  "12 Parliament Way, Battle Street, By the Bay")
AddGadgetItem(0, -1, "Ginger Brokeit" + #LF$ +
  "130 PureBasic Road, BigTown, CodeCity")
ButtonGadget(1, 70, 100, 250, 25, "Right-align text in 2nd row and 2nd column")

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Break
    Case #PB_Event_Gadget
      If EventGadget() = 1
        SetGadgetItemAttribute(0, 1, #PB_ListIcon_ColumnAlignment,
          #PB_ListIcon_Right, 1)
      EndIf
  EndSelect
ForEver
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [6.10 Beta 6] SetGadgetItemAttribute() with #PB_ListIcon_ColumnAlignment

Post by Fred »

No it works per column, not per cell. The doc is wrong.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2139
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: [6.10 Beta 6] SetGadgetItemAttribute() with #PB_ListIcon_ColumnAlignment

Post by Andre »

Any concrete suggestion for changing the docs? Thank you :)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply