ListIcon-remove column heading/scrollbars-api
Posted: Thu May 27, 2010 9:51 pm
I came across this code, by Freak, at http://www.purebasic.fr/english/viewtop ... 13&t=42372 on the forum and I wanted the Mac community to see and be able to use it.
I am puzzled of where 'ImportC "" ' actually is and what other commands might be available at this location. Like would it be possible to remove the scroll bar at the bottom or the side?
I am puzzled of where 'ImportC "" ' actually is and what other commands might be available at this location. Like would it be possible to remove the scroll bar at the bottom or the side?
Code: Select all
ImportC ""
SetDataBrowserListViewHeaderBtnHeight(Control.i, Height.u)
GetDataBrowserListViewHeaderBtnHeight(Control.i, *Height.UNICODE)
EndImport
#noErr = 0
If OpenWindow(0, 100, 100, 350, 100, "NoColumnHeader & AutoSize", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 5, 5, 340, 90, "", 200, #PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(0, 1, "", 200)
For X.l = 1 To 5
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")
Next
If GetDataBrowserListViewHeaderBtnHeight(GadgetID(0), @oldheight.u) = #noErr
; If you want the header back, call this again with 'oldheight' as last parameter
; (if you never want to get the header back, you don't need the GetDataBrowserListViewHeaderBtnHeight() call at all)
SetDataBrowserListViewHeaderBtnHeight(GadgetID(0), 0)
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf