by the default indentation of text in your columns, I might offer you
the cure...

Take a look into my code example which demonstrates how to use
the API function DataBrowserSetMetric to find the ideal indentation
by using a slider:
Code: Select all
ImportC ""
DataBrowserSetMetric(ControlRef.L, MetricType.L, UseDefaultValue.L, Value.F)
EndImport
#kDataBrowserMetricCellContentInset = 1
OpenWindow(0, 200, 100, 460, 130, "ListIcon Example")
ListIconGadget(0, 5, 30, 450, WindowHeight(0) - 30, "Name", 140)
AddGadgetColumn(0, 1, "Address", 289)
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")
AddGadgetItem(0, -1, "Didi Foundit"+ #LF$ + "321 Logo Drive, Mouse House, Downtown")
TrackBarGadget(1, 5, 7, 55, 20, 0, 55)
TextGadget(2, 65, 7, 290, 20, "Current text indentation in columns:")
TextGadget(3, 300, 7, 30, 17, "12", #PB_Text_Border | #PB_Text_Center)
SetGadgetState(1, 12)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
Case #PB_Event_Gadget
If EventGadget() = 1
CurrentIndentation = GetGadgetState(1)
DataBrowserSetMetric(GadgetID(0), #kDataBrowserMetricCellContentInset, #False, 0.0 + CurrentIndentation)
SetGadgetText(3, Str(CurrentIndentation))
EndIf
EndSelect
ForEver