Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] Windows Maximize button

Brian,

If the requirement is to restrict the shell to restrict resizing below a
minimum size then you can use shell.setMinimumSize(). This should serve your
purpose. 

Cheers
- Samir

-----Original Message-----
From: platform-swt-dev-admin@xxxxxxxxxxx
[mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of Brian Al Saadi
Sent: Thursday, 11 November 2004 1:42 PM
To: platform-swt-dev@xxxxxxxxxxx
Subject: Re: [platform-swt-dev] Windows Maximize button


Hi

I also have a minimum size of  my application window so when the user resize
the window to a smaller size than the smallest alowed, I resize it back to
the smallest size allowed. That's when I use the setSize(). I does not look
nice because I am using a controllistener  on the shell that listens to
resize events. So when this senario happens the resizing of the shell to a
non valid size and the resizing back to the smallest size allowed is visible
to the eye. This does not look good . Is there a better way of doing this?
sonething like using a mouseover or mousedragged listener so that when the
user drags one side of the shell the resizing is not happening untill mouse
is dropped and size is valid?



Thank you

On Thu, 11 Nov 2004 08:34:15 +1000, Samir Kumar Mishra
<smishra@xxxxxxxxxxxx> wrote:
> Probably then you can just store the size in a variable rather than 
> setting the size on the Shell itself. Alternatively you can just get 
> the size of shell before closing and it does not have to be at every 
> resize action.
> 
> 
> 
> 
> -----Original Message-----
> From: platform-swt-dev-admin@xxxxxxxxxxx
> [mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of Brian Al 
> Saadi
> Sent: Thursday, 11 November 2004 5:00 AM
> To: platform-swt-dev@xxxxxxxxxxx
> Subject: Re: [platform-swt-dev] Windows Maximize button
> 
> Cuz I want to remember the last size so next time I open the 
> application , it will be the same size as the last time before closing
> 
> On Wed, 10 Nov 2004 12:01:19 -0500, Steve Northover 
> <steve_northover@xxxxxxxxxx> wrote:
> >
> > It still seems like a bug in SWT but it's easy enough for you to 
> > work around in your code for now.  Why are you setting the size to 
> > the size that it already is?  Just delete the line of code that does 
> > this.
> >
> >
> >
> >
> >  Brian Al Saadi <brian.alsaadi@xxxxxxxxx>
> > Sent by: platform-swt-dev-admin@xxxxxxxxxxx
> >
> > 11/10/2004 10:52 AM
> >
> >
> >
> > Please respond to
> >  platform-swt-dev
> >
> >
> > To platform-swt-dev@xxxxxxxxxxx
> >
> > cc
> >
> > Subject Re: [platform-swt-dev] Windows Maximize button
> >
> >
> >
> >
> >
> >
> >
> > Steve
> >
> >  Now I set the size of the shell everytime I resize except when 
> > shell is maximized. And it works perfect now.. So it was actually my 
> > bug and not SWT but thanks for your help
> >
> >  Brian
> >
> >
> >  On Wed, 10 Nov 2004 09:28:59 -0500, Steve Northover 
> > <steve_northover@xxxxxxxxxx> wrote:  >  > Sounds like we have a bug.  
> > I'll check it out.  For now, just remove
> your
> >  > code that sets the size of the shell to the current size.  I 
> > can't
> think
> > of
> >  > a reason you'd ever want to do this.
> >  >
> >  >
> >  >
> >  >
> >  >  Brian Al Saadi <brian.alsaadi@xxxxxxxxx>
> >  > Sent by: platform-swt-dev-admin@xxxxxxxxxxx
> >  >
> >  > 11/10/2004 12:30 AM
> >  >
> >  > Please respond to
> >  >  platform-swt-dev
> >  >
> >  >
> >  > To platform-swt-dev@xxxxxxxxxxx
> >  >
> >  > cc
> >  >
> >  > Subject Re: [platform-swt-dev] Windows Maximize button
> >  >
> >  >
> >  >
> >  >
> >  >
> >  >
> >  >
> >  > Yes Steve
> >  >
> >  >  on the shell I have a control listener that is called eveytime 
> > the  >  shell is resized .. it sets the shell size to the current 
> > size.. May  >  be that is the problem, what do u think? Also why 
> > would it work on  >  Linux but not XP  >
> >  >  thanks
> >  >
> >  >
> >  >
> >  >
> >  >  On Tue, 9 Nov 2004 19:37:08 -0500, Steve Northover
> >  >  <steve_northover@xxxxxxxxxx> wrote:
> >  >  >
> >  >  > Are you doing something like setting the size of the shell to be
the
> >  > current
> >  >  > size of the shell while the shell is maximized?
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  > "Samir Kumar Mishra" <smishra@xxxxxxxxxxxx>
> >  >  > Sent by: platform-swt-dev-admin@xxxxxxxxxxx
> >  >  >
> >  >  > 11/09/2004 06:42 PM
> >  >  >
> >  >  > Please respond to
> >  >  > platform-swt-dev
> >  >  >
> >  >  >
> >  >  > To<platform-swt-dev@xxxxxxxxxxx>
> >  >  >
> >  >  > cc
> >  >  >
> >  >  > SubjectRE: [platform-swt-dev] Windows Maximize button
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  >
> >  >  > Brian,
> >  >  >
> >  >  > I Wrote a sample Windows application and tried the same and found
it
> >  >  > working. Which version of windows u r using? I'm running my
> > application
> >  > on
> >  >  > XP (Service pack 1).
> >  >  >
> >  >  > Cheers
> >  >  > - Samir
> >  >  >
> >  >  > -----Original Message-----
> >  >  > From: platform-swt-dev-admin@xxxxxxxxxxx
> >  >  > [mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of Brian Al
> > Saadi
> >  >  > Sent: Wednesday, 10 November 2004 9:36 AM
> >  >  > To: platform-swt-dev@xxxxxxxxxxx
> >  >  > Subject: [platform-swt-dev] Windows Maximize button
> >  >  >
> >  >  >
> >  >  > Hi
> >  >  >
> >  >  > This problem is on Windows only .. in Linux it works perfect with
no
> >  >  > problem' ok when I hit the maximize button on my shell it becomes
> >  > maximized
> >  >  > but when I hit it again it never goes to its original size as if
it
> >  >  > remembers the last size which is maximized size.. any idea why it
> > works
> >  > on
> >  >  > Linux but not on Windows?
> >  >  >
> >  >  > Brian
> >  >  > _______________________________________________
> >  >  > platform-swt-dev mailing list
> >  >  > platform-swt-dev@xxxxxxxxxxx
> >  >  > http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >  >  >
> >  >  > _______________________________________________
> >  >  > platform-swt-dev mailing list
> >  >  > platform-swt-dev@xxxxxxxxxxx
> >  >  > http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >  >  >
> >  >  >
> >  >  _______________________________________________
> >  >  platform-swt-dev mailing list
> >  >  platform-swt-dev@xxxxxxxxxxx
> >  >  http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >  >
> >  >
> >  _______________________________________________
> >  platform-swt-dev mailing list
> >  platform-swt-dev@xxxxxxxxxxx
> >  http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >
> >
> _______________________________________________
> 
> 
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx 
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> 
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx 
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top