Le 2 mai 06 à 20:58 Soir, Matt Harrington a écrit:
I want to center a control in a fullscreen window with
Window1.Fullscreen=True and Window1.MenuBarVisible=False. I use
RB2006 R1 on OSX 10.4.6. From what I can gather, I have to set the
control's position in Window1's Open event like this:
Control1.Left = (Window1.Width / 2) - (Control1.Width / 2)
Control1.Top = (Window1.Height / 2) - (Control1.Height / 2)
Correct, assuming the window has no titlebar.
If it has one, then the returned height doesn't take care of the
titlebar (so your control won't be centered).
My problem is that even when Window1.Fullscreen=True, I still get:
Window1.Width = 1024
Window1.Height=768
Those are the values I created Window1 with in the first place.
So, how do I really get a fullscreen window, and is my logic for
centering a control in a window sound? I also tried
"Window1.Maximize" in Window1's Open event handler, but I still
only get Width=1024 and Height=768.
(I assume your screen is not 1024x768)
It sounds logical that the width/height remain unchanged since the
fact that the window is shown in full screen mode is obtained by the
FullScreen property.
Would it not be a good idea to use:
screen(0).width, screen(0).height, since the window is fullscreen?
So you avoid the problem with the titlebar,
also._______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>