I need a simple way to have a container with controls in a right pane.
I use MBSPlugins to use NSScrollView for this and does work but when resizing the window, some odd bits are happening.
Here is a download link for a project that shows the issue. https://limewire.com/d/rpn41#qABOJ6agnI
Compile β scroll up and down in the right pane. This works fine.
Now resize the window and see what happens.
Anyone has a solution for this?
Hi Christophe,
Yes itβs weird.
Try adding the following lines in the canvas Paint event:
FXscrollView.SetFrameOrigin(CanvasHolder.Left, Window1.Height-CanvasHolder.Height)
FXscrollView.SetFrameSize(CanvasHolder.Width, CanvasHolder.Height)
and add locking on myFXContainer like this:
Var containerNSView As NSViewMBS = myFXContainer.NSViewMBS
myFXContainer.LockLeft = True
myFXContainer.LockTop = True
myFXContainer.LockRight = True
myFXContainer.LockBottom = True
It seems to fix it with my configuration (Xojo 2024r4.1, MBS 245, macOS 15.4.1).
1 Like
Thank you Olivier ! Perfect fix.
Edit: hmmm.. stil some odd things are happening. Try making the window small. After doing this, you cannot scroll to the top anymore.
Also, it seems the container is getting bigger and bigger when resizing the window.
Not seeing that after locking everything in Xojo 2024r1. What is the goal?
Just resize the window to a small window and then back bigger. Then scroll up and down β¦
No, I meant: what is the design goal? Something like the Xojo IDE with the inspector? Do you have to embed?
Various .. I need a container that I can fill with controls and that can be scrolled up and down.
For a current B2C project app, it has a right pane similar to Pixelmator (read: many controls that cannot be displayed all at once - so up and down scrolling is needed).
Anyhow, I am still looking for a solution for the NSScrollView issue.