Container control goes over the toolbar in windows build

Hello !

My app has a container control embed into a window, a scroll bar and a toolbar ( well… some other control too)
the scroll bar moves the container control up/down within the window.
On Mac everything is ok but in windows the container control goes over the toolbar while moving up (instead of going behind of it).

Anyone had the same problem ? is that a bug ?

At first blush I’d say bug but perhaps not. Couple of things to try.

Check to see what the order is on the toolbar vs the container and make sure the container should go underneath it.

You might have to check the container location when scrolling and manually set visibility (assuming the first way doesn’t work).

Hello Bob and thanks for you reply

Unfortunately i’ve been unable to solve with your hint… i’ve submitted a bug report with an example…


Sorry I couldn’t help…

Seems like a bug - it would appear it doesn’t have a paint procedure as toolbar.refresh after the move wont force a repaint. Window.refresh will make it appear “over” but then there’s a 1 pixel gap at the top + flicker for windows.

I would suggest putting your current scrollbar + container control within another container control, then adding that into the window. You’ll get the clipping area from the first container and you just need to make it fill the whole window minus the height of the toolbar.

Wow, very nice ! Now works good !

Thank you Tony !

Assuming you’re building for Mac Cocoa? Mac Carbon controls do not respect the bounds of a container (unless this changed recently).

Thanks for the info Bob, luckily i’m building with Cocoa :slight_smile:

Necromaniac on another thread

I get the over run (not clipped error) described in this thread on Windows, not on OS X.

Any suggestions?

The hierarchy in the Window is:
Tab Control

  • Groupbox (with title “Form Items:”)
    • Scroller
      – Groupbox without title (called Inner GroupBox)
      ---- Dynamically added ContainerControls

Scroller controls the position of the “Inner Group box”

Any suggestions?

Hm…rather than using a group box could you use another container and draw the box and label yourself? It looks like the GroupBox isn’t clipping right.

I’ve tried GroupBox, ContainerControl, to put it directly into into TabControl, the only thing that works is a GroupBox without title and them move al Container boxes instead of the superview, but it still clips a little off as the GroupBox has a border on Windows, gonna try some more different solutions, but this was a weird one, only fails on Windows.

This is the closest to “perfect” I can get.

Now - if I could override the render method of the GroupBox to not render the frame it would be perfect…

Do you have shareable project? This seems like something we can help figure out.

It’s a private client application so I don’t really know, but I can crate a small testable hard coded application to show this, gimme a sec…

Ok, I made a stripped version.
F.Y.I - The Windows version I’m testing on is Server2008 (Windows 7 core), I know they wanted 7, 8 & 10 to be able to run it (or they haven’t said otherwise when asked.

Put it here:

I remember reading something about Server 2008 and some graphic issues, but I’m no expert. I hope my memory is wrong and you can fix your issue without changing OS.

Hmm, so if someone has a real Windows (I don’t), maybe the issue really isn’t there?
I only have Windows Servers, as most of the stuff I’ve done on windows is server software or server related,

Pretty sure this is it because Sever 2008 is ten years old and based on Vista (which is not supported by the current Xojo). I have no problems with dynamically embedded scrollable ContainerControls on current versions of Windows.

OK, then I will just leave it until I find a windows to test on!

Thanks all!