Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » [Bug (minor)]: CenterScreen not working
[Bug (minor)]: CenterScreen not working [message #48631] Thu, 10 August 2017 11:02 Go to next message
rafiwui is currently offline  rafiwui
Messages: 105
Registered: June 2017
Location: Stuttgart, Germany
Experienced Member
If you explicitly set fullscreen to false, the position of the window is not centered if you call
FullScreen(false);
SetRect(0, 0, sizeX, sizeY);

Even if you call it like this:
FullScreen(false);
SetRect(0, 0, sizeX, sizeY);
CenterScreen();

So something in FullScreen overrides any other (even if called after it) settings specifying the position.
The only workaround (besides removing the FullScreen(false) call) is to manually set a position in SetRect:
FullScreen(false);
SetRect(50, 50, sizeX, sizeY);

Because if the position is set to zero, you cant see the window bar.


Greetings
Daniel
Re: [Bug (minor)]: CenterScreen not working [message #48697 is a reply to message #48631] Fri, 25 August 2017 09:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sorry, this looks like incomplete documentation.

CenterScreen (and related methods) only apply when window is being opened. After that, SetRect always sets real position of window "client area".

It is only stated in the first method in the series (NoCenter). Adding to all of them.

Mirek

Re: [Bug (minor)]: CenterScreen not working [message #48698 is a reply to message #48697] Fri, 25 August 2017 09:13 Go to previous messageGo to next message
rafiwui is currently offline  rafiwui
Messages: 105
Registered: June 2017
Location: Stuttgart, Germany
Experienced Member
So FullScreen() is opening the window in the moment whent it is called?

Greetings
Daniel
Re: [Bug (minor)]: CenterScreen not working [message #48701 is a reply to message #48698] Fri, 25 August 2017 14:21 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
rafiwui wrote on Fri, 25 August 2017 09:13
So FullScreen() is opening the window in the moment whent it is called?


No. It is a flag that affects how window will be opened (using Open or OpenMain).

[Updated on: Fri, 25 August 2017 14:27]

Report message to a moderator

Previous Topic: DBus integration -- need help
Next Topic: [Feature request] Relative positioning
Goto Forum:
  


Current Time: Thu Mar 28 14:55:24 CET 2024

Total time taken to generate the page: 0.01125 seconds