Hide Columns of a ListIconGadget???
- stefanpape
- User
- Posts: 12
- Joined: Sun Aug 04, 2013 11:12 am
Hide Columns of a ListIconGadget???
If I set the ColumnWidth of a column in a ListIconGadget to zero, in Windows you see nothing of the column.
If you make the same in MacOSX, the ColumnWidth isn't zero, you see the column.
Has somebody an idea, how I can hide a column of a ListIconGadget in Mac OS X?
Thank you very much for the help.
If you make the same in MacOSX, the ColumnWidth isn't zero, you see the column.
Has somebody an idea, how I can hide a column of a ListIconGadget in Mac OS X?
Thank you very much for the help.
Re: Hide Columns of a ListIconGadget???
Code: Select all
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(0, 1, "Address", 250)
AddGadgetItem(0, -1, "Harry Rannit"+Chr(10)+"12 Parliament Way, Battle Street, By the Bay")
AddGadgetItem(0, -1, "Ginger Brokeit"+Chr(10)+"130 PureBasic Road, BigTown, CodeCity")
Columns = CocoaMessage(0, GadgetID(0), "tableColumns")
Column0 = CocoaMessage(0, Columns, "objectAtIndex:", 0)
CocoaMessage(0, Column0, "setHidden:", #YES)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
- stefanpape
- User
- Posts: 12
- Joined: Sun Aug 04, 2013 11:12 am
Re: Hide Columns of a ListIconGadget???
Cool, Thank you very much!
Re: Hide Columns of a ListIconGadget???
Thanks!
I wrapped it into procedure for simplicity:
I wrapped it into procedure for simplicity:
Code: Select all
Procedure ListIconGadgetHideColumn(gadget.i,index.i,state.b)
Protected column = CocoaMessage(0,CocoaMessage(0,GadgetID(gadget),"tableColumns"),"objectAtIndex:",index)
If column
If state
CocoaMessage(0,column,"setHidden:",#YES)
Else
CocoaMessage(0,column,"setHidden:",#NO)
EndIf
EndIf
EndProcedure
Re: Hide Columns of a ListIconGadget???
It seems this not work, if you add icons to the ListIconGadget. If you add an icon, PureBasic adds a new undefined column at the first position of the ListIconGadget and the gadget gets a column offset - very strange. Can somebody explain that?deseven wrote:Thanks!
I wrapped it into procedure for simplicity:Code: Select all
Procedure ListIconGadgetHideColumn(gadget.i,index.i,state.b) Protected column = CocoaMessage(0,CocoaMessage(0,GadgetID(gadget),"tableColumns"),"objectAtIndex:",index) If column If state CocoaMessage(0,column,"setHidden:",#YES) Else CocoaMessage(0,column,"setHidden:",#NO) EndIf EndIf EndProcedure
Re: Hide Columns of a ListIconGadget???
Hi stefanpape,
Don't know if these Topic Headers will help, or if any use on Mac. But here they are anyway
Listicon, Hide-Unhide columns by clicking on Listicon Header
Clear columns from list icon gadget?
Don't know if these Topic Headers will help, or if any use on Mac. But here they are anyway
Listicon, Hide-Unhide columns by clicking on Listicon Header
Clear columns from list icon gadget?
If it's falling over......just remember the computer is never wrong!
Re: Hide Columns of a ListIconGadget???
Icons and CheckBoxes have their own Columns, so the other Columns move to the back.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Hide Columns of a ListIconGadget???
But how I find out, if these extra columns are active? It seems these colums are added and removed "on the flow"?mk-soft wrote:Icons and CheckBoxes have their own Columns, so the other Columns move to the back.
Re: Hide Columns of a ListIconGadget???
Its late, i go to sleep...
Show here: viewtopic.php?f=19&t=72124
Show here: viewtopic.php?f=19&t=72124
Code: Select all
*Column0 = CocoaMessage(0, CocoaMessage(0, *TableView, "tableColumns"),
"objectAtIndex:", 0)
Ident = PeekS(CocoaMessage(0, CocoaMessage(0, *Column0, "identifier"),
"UTF8String"), -1, #PB_UTF8)
If Ident = "Image"
ColumnOffset + 1
ElseIf Ident = "CheckBox"
ColumnOffset + 1
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Hide Columns of a ListIconGadget???
Great! Exactly what I was looking for! Thanks!!!!