Is it possible to prevent ListViewGadget Scrolling?

Mac OSX specific forum
HarrysLad
User
User
Posts: 59
Joined: Fri Jun 04, 2010 9:29 pm
Location: Sunny Spain

Is it possible to prevent ListViewGadget Scrolling?

Post by HarrysLad »

With the ListViewGadget, is it possible to prevent horizontal scrolling?
I know how to hide the scrollbar but it's all too easy to inadvertently scroll sideways with a trackpad or Magic Mouse and this gives me problems when displaying a table.

Dave
wombats
Enthusiast
Enthusiast
Posts: 716
Joined: Thu Dec 29, 2011 5:03 pm

Re: Is it possible to prevent ListViewGadget Scrolling?

Post by wombats »

This seems to work:

Code: Select all

If OpenWindow(0, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ListViewGadget(0, 10, 10, 250, 120)
  For a = 1 To 12
    AddGadgetItem (0, -1, "Item " + Str(a) + " of the Listview")
  Next
  SetGadgetState(0, 9)
  CocoaMessage(0, GadgetID(0), "sizeToFit")
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
HarrysLad
User
User
Posts: 59
Joined: Fri Jun 04, 2010 9:29 pm
Location: Sunny Spain

Re: Is it possible to prevent ListViewGadget Scrolling?

Post by HarrysLad »

Many thanks wombats. That works for me. :D

Dave
Post Reply