TextArea Scrollbar issue

Hi,

I ran into a weird problem/observation today and need some help with a declare.
In one of my projects, my TextAreas are transparent using this declare in the open method:

[code]Declare Sub setDrawBack Lib “Cocoa” selector “setDrawsBackground:”(id As Integer, b As Boolean)
Declare Function docView Lib “Cocoa” selector “documentView”(id As Integer) As Integer

setDrawBack(Me.Handle, False)
setDrawBack(docView(Me.Handle), False)
[/code]

That works great and looks awesome. Also, the vertical scrollbar goes away/hides and all has a more OSX native look.

I use an iMac with both a mouse and a trackpad. Because the batteries of my trackpad died this morning, I use the mouse only. But now, the scrollbar is the old fashioned way and has a white background. It also stopped the automatic hiding.

As soon as I turn the trackpad back on and restart the App (or run the App on my MBP) all works fine.

Is there any way I can modify the declare so that it always looks as if the trackpad is on?

EDIT: Oh, darn. I now see that it has nothing to do with the declare.
Without trackpad, a TextArea scrollbar doesn’t hide and has the ‘old-fashioned’ -look. With trackpad the scrollbar hides and has the native -look. Guess it’s a Xojo thing.
Is there any way I can force it so it aways looks like with a trackpad?

[quote=220679:@Marco Hof]Without trackpad, a TextArea scrollbar doesn’t hide and has the ‘old-fashioned’ -look. With trackpad the scrollbar hides and has the native -look. Guess it’s a Xojo thing.
Is there any way I can force it so it aways looks like with a trackpad?[/quote]
System Preferences -> General -> Scroll settings is where the system wide setting for this is.

There is an override declare for this, but it’s more for forcing the older style (scrollbar constantly visible) than for forcing the srollbars to be hidden.

[code] declare sub setScrollerStyle lib “AppKit” selector “setScrollerStyle:” (NSScrollViewHandle as integer, value as integer )
const NSScrollerStyleOverlay = 1
const NSScrollerStyleLegacy = 0

setScrollerStyle( me.handle, NSScrollerStyleOverlay )[/code]

There might be a NSUserDefaults setting that you can apply when the application opens.