Page 1 of 2

Maximize a window in a method

PostPosted: Fri Jul 30, 2004 9:01 pm
by DFehrenbach
Is there a way to maximize a window using a method?

PostPosted: Fri Jul 30, 2004 10:39 pm
by patrick
same question here!

PostPosted: Sat Jul 31, 2004 9:18 am
by Harjo
There is'nt any! But would be a nice feature!

PostPosted: Sat Jul 31, 2004 10:38 am
by patrick
I guess that's what we meant :wink:

PostPosted: Sat Jul 31, 2004 11:41 am
by Harjo
Than you have to put it in the category: feature requests! :wink:

PostPosted: Sat Jul 31, 2004 12:11 pm
by patrick
you don't want to be so demanding all the time. You make it a question and it sounds less demanding...

PostPosted: Sat Jul 31, 2004 12:15 pm
by Harjo
:lol:
I donM-4t think it is demanding. there is the feature request for!
If they do something with it? that's up to them.

But hey! I think 70-80% is accomplished, so there is a fair change!

PostPosted: Sat Jul 31, 2004 12:21 pm
by pbakker
Guys,

some things we can fix ourselves, because Servoy comes with the option to create plugins.... :D

I've allready added getScreenWidth and getScreenHight to my Tools plugin. That's all you need to do what you want to do, right?

I hope to release is this weekend....

Paul

PostPosted: Sat Jul 31, 2004 12:26 pm
by Harjo
that is not necessary, because those functions are already present in Servoy itself.

Yes you can do it that way, but that does not work right, because (on Windows) you have a start-bar. One customer has the start-bar, one-line another has the start-bar two lines. So your solution disappears behind this start-bar.

A maximize-function keeps such things in mind!

PostPosted: Sat Jul 31, 2004 12:29 pm
by pbakker
Oops, you're right, didn;t think about that.... :(

PostPosted: Sat Jul 31, 2004 2:33 pm
by pbakker
Well, I digged into it some more.... Found some tools to see how much space is actually taken up by things like the Windows menu bar.

I can give you a fucntion to retrieve those. You can then do something like:

application.setWindowLocation(0,0);
application.setWindowSize(application.getScreenWidth()-plugins.PBS_Tools.getScreenWidth2(), application.getScreenHeight()-plugins.PBS_Tools.getScreenHight2())


The result is close to the Maximize fucntion. Basically, it just enlarges the window to the maximun available size and places it properly on the screen

A real Maximize function makes the window a bit larger, so borderlines drop off. I could not find any way to get this done.... :( Java doesn't seem to support that....

Maybe if the Servoians have some pointers.....

Would whatever I have now be interesting to include?

Paul

PostPosted: Mon Aug 02, 2004 5:14 pm
by jcompagner
i think i am agains this feature :)

We already gave you guys to much with with size and location settings.
Every time i open a solution from one of you guys and my toolbars/locations and sizes are suddenly changing. I HATE that. :)

Don't touch sizes. I have my own size set. Look how all other programs work they don't set sizes hard. The user should be able to set the location and size of its screen, and then it should never be touched by the program itself.

If for example 2 or 3 screens are becomming more and more common. Then it will be completely horrible. Then it is possible a user always want the client to be on the second screen on that posiiton and so big. But suddenly a solution developer things he knows better and places it on the first screen on position X with size Y.. Horrible.

You only should set a initial size, when the solution is started for the first time, or maybe even better, It should only be set the first time servoy client is started and it is loading the first what ever solution.

PostPosted: Mon Aug 02, 2004 5:20 pm
by patrick
I more or less agree... The only thing against it is that on Windows maximized applications are easier to understand for the user. So on Windows I like the the possibity to maximize a window.

PostPosted: Mon Aug 02, 2004 5:31 pm
by jcompagner
yes the users should be able to maximize it.
What applicaiton starts up maximized by default?
I don't know anyone.

PostPosted: Mon Aug 02, 2004 5:43 pm
by Harjo
Every time i open a solution from one of you guys and my toolbars/locations and sizes are suddenly changing. I HATE that.


Now I know why the customizable menu-bar is not implemented yet! :lol: