Is there a way to maximize a window using a method?
same question here!
There is’nt any! But would be a nice feature!
I guess that’s what we meant
Than you have to put it in the category: feature requests!
you don’t want to be so demanding all the time. You make it a question and it sounds less demanding…
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!
Guys,
some things we can fix ourselves, because Servoy comes with the option to create plugins…
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
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!
Oops, you’re right, didn;t think about that…
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
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.
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.
yes the users should be able to maximize it.
What applicaiton starts up maximized by default?
I don’t know anyone.
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!
My soon to release Tools plugin will have a function to maximize the main application window.
Paul
This is very old topic, but still in 5.x there is not a (simple) method to maximize the main-window!
(yes you can work-around, a lot, but still there is no cross platform solution, that always works correct, and btw: all those workarounds are not really maximizing the window, it’s all about setting a window size.)
I agree fully with Johan, that every time I open a solution, and my sizes, or positions are changed every time, I really hate that too!!
So that’s not I want. I want to set a size(that’s possible) or maximize (not possible) the the main-window, only the first time
If you download for the first time a Servoy Client, it is opened, in such a (IMHO ridiculous) small window, that developers are tempted to tune it.
Also,if you look at Microsoft Word, Excel, or openOffice they are ALL started maximized on Windows (only the first time!)
So, still hoping, that there is some room, for enhancement in this area…
Very old topic indeed.
Already possible in Servoy 6.0: see plugins.window.maximize()
Paul
ahh. that one I missed! thanks!!
(maybe already, should be: finally!)
If you look at the window plugin, you will see that there is a maximize([windowName]) method in Servoy 6!
I sent a patch to Johan 4 months ago, and he added it to the trunk: https://www.servoyforge.net/projects/servoy/repository/revisions/2540