I was wondering if there's a way to resize a window as a gradual animated
process. I have an action which shows extra content and changes the
size of a window- which works fine but I was wondering if there was a way
to get the window to gradually open wider or taller. This is pretty
common within mac applications and I've seen it in a few places in
windows and wondered if this is possible cross platform, or alt east on
some platforms through wx. I've tried searching but not come up with
much mainly because I don't know exactly what the name of this is!
What widget do you use? If you have a AuiManager you can use AUI_MGR_LIVE_RESIZE as a flag, but its on all widgets something else (like wx.SP_LIVE_UPDATE at a splitterwindow)
What widget do you use? If you have a AuiManager you can use
AUI_MGR_LIVE_RESIZE as a flag, but its on all widgets something
else (like wx.SP_LIVE_UPDATE at a splitterwindow)Alex
I currently have content on panels in boxsizers so that I can hide and
show the panels when I want to display something different or extra
bits. Do you know how I can get it to work with this setup or of theres
something else I should use instead?
What widget do you use? If you have a AuiManager you can use
AUI_MGR_LIVE_RESIZE as a flag, but its on all widgets something
else (like wx.SP_LIVE_UPDATE at a splitterwindow)Alex
I currently have content on panels in boxsizers so that I can hide and
show the panels when I want to display something different or extra
bits. Do you know how I can get it to work with this setup or of theres
something else I should use instead?
Alex Hefner <H._Alex <at> web.de> writes:> > > What widget do
you use? If you have a AuiManager you can use AUI_MGR_LIVE_RESIZE
as a flag, but its on all widgets something else (like
wx.SP_LIVE_UPDATE at a splitterwindow)Alex
I currently have content on panels in boxsizers so that I can hide
and show the panels when I want to display something different or
extra bits. Do you know how I can get it to work with this setup or of
theres something else I should use instead?
I dont know if this is a good solution but i think you can make it
like this:# toplevelwindowself.Bind(wx.EVT_SIZING,self.sizing)def
sizing(self,event): self.SetSize(event.Size)I hope this is what you
look forAlex
where self is the Frame, self.p is the panel that covers the whole
frame which other panels are children of and sizer is the main sizer
that all other bits and sizers are inside of
What I was wondering is if I could make the window size gradually
slide bigger or smaller to get to this new size. I presume there's a
nicer way to do it than to SetSize multiple times to make an animated
effect.
···
Am Donnerstag, 10. November 2011 12:05:06 UTC+1 schrieb Paul:
Am Donnerstag, 10. November 2011 12:05:06 UTC+1 schrieb Paul:
Alex Hefner <H._Alex web.de> writes:> > > What widget do
you use? If you have a AuiManager you can use AUI_MGR_LIVE_RESIZE
as a flag, but its on all widgets something else (like
wx.SP_LIVE_UPDATE at a splitterwindow)Alex
I currently have content on panels in boxsizers so that I can hide
and show the panels when I want to display something different or
extra bits. Do you know how I can get it to work with this setup or of
theres something else I should use instead?
I dont know if this is a good solution but i think you can make it
like this:# toplevelwindowself.Bind(wx.EVT_SIZING,self.sizing)def
sizing(self,event): self.SetSize(event.Size)I hope this is what you
look forAlex
where self is the Frame, self.p is the panel that covers the whole
frame which other panels are children of and sizer is the main sizer
that all other bits and sizers are inside of
What I was wondering is if I could make the window size gradually
slide bigger or smaller to get to this new size. I presume there’s a
nicer way to do it than to SetSize multiple times to make an animated
effect.
def _showNextStep(self):
sz = self.GetSize()
sz += self._step
if sz.width > self._endSize.width or sz.height > self._endSize.height:
sz = self._endSize
self.SetSize(sz)
if sz != self._endSize:
wx.CallLater(self._aniTime, self._showNextStep)
In other cases I've done things like vary the step size based on how much further there is to go, or to vary the delay between steps. Things like that can add nice effects.
···
On 11/10/11 1:59 AM, Paul wrote:
I was wondering if there's a way to resize a window as a gradual animated
process. I have an action which shows extra content and changes the
size of a window- which works fine but I was wondering if there was a way
to get the window to gradually open wider or taller. This is pretty
common within mac applications and I've seen it in a few places in
windows and wondered if this is possible cross platform, or alt east on
some platforms through wx. I've tried searching but not come up with
much mainly because I don't know exactly what the name of this is!