YA IS DISGUSTIPATIN’!

YA IS DISGUSTIPATIN’ ! (Popeye, KFS).

Why ?

The code below gave (now) different result than what I am expecting (Window1.Open).

Dim myBounds As New Realbasic.Rect // Fills the properties myBounds.Left = Screen(0).Width - (Me.Width + 2) myBounds.Top = Screen(0).AvailableTop myBounds.Height = Self.Height myBounds.Width = Self.Width // Apply the changes Self.Bounds = myBounds

The window height is set at design time (and not elsewhere) to 450 pixels. At run time, the Height is now 428. When I comment the code, I keep my Height.
On Windows XP (compiled on macOS), I have the same behavior. (I came back to my project becauseof that.)

I nearly forgot:
I have a TextField (TF), for user reports, at the window’s bottom.
Above that TF are a bunch of PushButtons (Cancel, Save, Open, etc.).
And above … above are also some controls. Here lie the second bug:

These three lines of controls goes up above the three Canvas that are above them at design time (get the pdf, link below).

All these controls locations are locked to bottom (some left, some right) AND the window cannot be enlarged nor shrinked.

BTW: this project compiled fine until yesterday…

I even checked Xojo 2016r4.1 and get the same trouble. The last three lines of Controls goes up by 22 pixels (why ?), but only when Realbasic.Rect is not commented. I use Realbasic.Rect to place the window at the screen Top / Right.

What can I do ?

screen shots in a simple “manual” . This is when the software was working (the window does not shrink at tun time)

Xojo 2015r1
El Capitan .6 (current).

What happens If you just set:

Self.Left = Screen(0).Width - (Me.Width + 2) Self.Top = Screen(0).AvailableTop

Thanks Greg for the tip.

The window title is hidden below the MenuBar.

But my Controls are where they are meant to be.

What I never understand is the why. Why this now start to bugs me ?
I changed nothing to the Realbasic.Rect.

A previous version of the application does not show this bad behavior.

Stupid question:

Is the order of setting the Realbasic.Rect significant ?

This does not works as intended:

Dim myBounds As New Realbasic.Rect // Fills the properties myBounds.Left = Screen(0).Width - (Me.Width + 2) myBounds.Top = Screen(0).AvailableTop myBounds.Height = Self.Height myBounds.Width = Self.Width // Apply the changes Self.Bounds = myBounds

And this one seems to works (on a previous project):

Dim myBounds As New Realbasic.Rect // Fills the properties myBounds.Left = Screen(0).Width - (Me.Width + 2) myBounds.Top = Screen(0).AvailableTop myBounds.Width = Self.Width myBounds.Height = Self.Height + 22 // was here before I moved the line down) // Apply the changes Self.Bounds = myBounds

22 comes from the original window height (450) and the new reported window height (428):

450 - 428 = 22.

The window location is now what I want (just below the menuBar and screen rightmost).

So, this is the result of 20 hours without Xojo. The idea comes from x,y w, h…
Who asked me why I am so slow in programming ?

EXCEPTED:

On Windows XP, I keep the problem (VirtualBox). I do not have my Windows10 laptop handly. I will check later.

The project was not compiled locally (Windows XP). The application was created on El Capitan, moved to the shared folder.

Edit:
Xojo 2015r1.