is not supported in MacOS. But the underlying DataBrowser API of MacOS has two
features which do something similar:
- one feature enables alternating row colors to optically separate the single rows
- another feature draws column dividers
This code example demonstrates their use to "simulate" grid lines:
Code: Select all
ImportC ""
DataBrowserChangeAttributes(ControlRef.L, AttributesToSet.L, AttributesToClear.L)
EndImport
#kDataBrowserAttributeListViewAlternatingRowColors = (1 << 1)
#kDataBrowserAttributeListViewDrawColumnDividers = (1 << 2)
OpenWindow(0, 0, 0, 430, 105, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 420, 95, "Name", 110)
DataBrowserChangeAttributes(GadgetID(0), #kDataBrowserAttributeListViewAlternatingRowColors | #kDataBrowserAttributeListViewDrawColumnDividers, 0)
AddGadgetColumn(0, 1, "Address", 289)
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")
AddGadgetItem(0, -1, "Didi Foundit"+ #LF$ + "321 Logo Drive, Mouse House, Downtown")
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow