Prevent window being resized

Questions and answers for designing and implementing forms in Servoy

Prevent window being resized

Postby caroline.j » Fri Mar 23, 2012 1:58 pm

Hi All,
Does anyone know if there is a way of making a window non-resizeable.
Basically I have a few windows that are modal and will never need to change size and I was hoping to be able to set that so that hovering over the border didn't give you the resize arrows. Is there maybe a border type that will give me this?
Many thanks in anticipation
Caroline
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm

Re: Prevent window being resized

Postby AlanBourke » Fri Mar 23, 2012 3:13 pm

In the Smart Client you could possibly put some code in OnResize() to force the size back to what you want.
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Prevent window being resized

Postby caroline.j » Fri Mar 23, 2012 3:16 pm

I had thought of that but figured it would look very messy.
All I really want is a fixed border!
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm

Re: Prevent window being resized

Postby kwpsd » Fri Mar 23, 2012 8:24 pm

You could try this:

Code: Select all
var window = application.getWindow( 'yourWindowName' )
   
    window.resizable = false
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Re: Prevent window being resized

Postby caroline.j » Sat Mar 24, 2012 11:30 am

Many thanks Kim that did the trick.
Shame you can't set that in the design screen!
caroline.j
 
Posts: 81
Joined: Wed Feb 08, 2012 9:25 pm

Re: Prevent window being resized

Postby jcompagner » Mon Mar 26, 2012 5:30 pm

in what property would you set that?
Windows can't be designed at all.. So how would you do that on design time.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Prevent window being resized

Postby fgsmartest » Mon Apr 16, 2012 12:32 pm

I am interested in preventing window resize. i Notice the function asks for the window name, i didnt create any windows, i am just running it in the smart client window, what would be the window name in this case?
fgsmartest
 
Posts: 38
Joined: Thu Apr 12, 2012 12:40 am

Re: Prevent window being resized

Postby kwpsd » Mon Apr 16, 2012 11:08 pm

To get the main window object, use the same method but do not specify a window name:

Code: Select all
var window = application.getWindow()
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA


Return to Forms

Who is online

Users browsing this forum: No registered users and 6 guests