AppleLib & UI Customization

First of all let me thanks all those who contributed to this AppleLib for Xojo. (In particular as it’s provided with absolutely no license restrictions).

I’m developing my app for charity so I appreciate the help provided by many who shared their knoledge with me as well.

I’m approaching now with the final touch of my app, and surprisingly, the harder I encountered is about changing the scrollbar background color (both techniques Win & Mac under my lens).

I’ve read several discussions about this topic posted on this forum before, and it merges the better approach (latest Macs) is the implementation of a Third Party plugin such As MBS, or even AppleLib Provided by Ulrich Bogun for free.

I’m trying to run across the way of indipendency but it’s a little bit hard to me, I isolated the part I think could lead me to the right implementation but i lack in experience in doing that.

Here a commemorative screenshot :laughing:

You see at the right the same text area has a different scrollbar, the background is removed, and this exactly what I was looking and repeatedly failed for, anyway I miss a way to manage the exploited technique that would bring the same result to me.

Any tip highly appreciated.

A sample project showing what you’ve done to get this far would be very helpful.

Hi Greg, thank for your interest. Actually I have nothing to show you, in fact the screenshot derives by the main AppleLib provided by Ulrich Bogun. Nothing more nothing less. What I’m not able to understand is this allow me to interact with system controls, probably I’m just dreaming about something that can’t really be done.

I wasn‘t aware anyone is using my abandoned lib today :wink:
That sample is using a NSViewController’s presentViewController:asPopOver… to show a control as popover.
I have no idea why the representation is changed this way. The control still is accessible inside its Xojo wrapper.

There is another thread here where I show that it’s not possible to use a TabPanel without optical bugs in Dark Mode this way.

Addition: A Xojo TextArea should natively on a Mac be a NSTextView inside a NSScrollView. Theoretically it should be possible to address the latter one via declares or MBS – even MacOSLib was modernised to work with 64 Bit as far as I know –, and influence its design properties. Did you search the forum for something like that, @Andres_Perrota1 ? I don’t think I had ready made code for that in AppleLib.

Which version of Xojo are you using?

In “System Preferences” -> “General”, which option is selected under the heading “Show scrollbars”?

I suspect that the scrollbar is showing on the left because you may have a mouse plugged in, or the option to always show scrollbars. Whereas on the right, Apple have decided to hide the scrollbar when the TextArea is in a popover.

If you set the “Show Scrollbar” option to “When scrolling” does this make it go away for the image on the left?

I’m not sure I’m really using it… :laughing: let’s say I’m play with it like in my childhood with familiy faulty appliances.

I’m not sure what you are referring with this question to. This is the ViewControllerWindow of course, I just removed the enhanced radio buttons area and moved the xojo textarea inside the window to get the difference before and after the pop-up invocation. ( I made all of that just to focus on the part of interest

That’s not a good new, by the way I’m still in depbt of my praise for you having assembled such a massive collection.

Still bad news for me… I didn’t know it, so If I corectly understood it’s just a particular rendering behavior and not an active interaction with system controls. That’s a further reason why I didn’t found nothing within the code.

2020

Automatic Scrollbar. Based on mouse and trackpad.

It seems yours and Ulrich assumptions go further apart my own knoledge about the Apple system behavior.

I will try to confirm but I’m pretty sure you cannot be wrong at this point.

You got the answer with

That’s exactly what I meant. The optical representation of some controls changes when used as content for a popover via viewcontroller without any further action on my side. I found my post where I encountered similar behaviour and found no workaround: DarkMode Redrawing issues (when using WindowsViewControllerMBS)

Thanks a lot! Things would have gone differently if the Xojo framework had not been deprecated. As it was all built around it to be future compatible, I felt discouraged to change all that stuff again for API 2.

1 Like

That’s very sad, overall thinking about the time you spent over it.

This my fake canvas scrollbar. About 30 lines of g.Paint included the rollover behavior, unfortunately its only real quality is to remind me my (and many others) failure on this.

Canvas Scrollbar