I have a certain pane that I'm adding to my AUI which I want to always
stay at the same constant size. The pane is a panel of buttons of
fixed size and I don't want there to be any space around them. How do
I do this?
I have already tried setting MinSize, MaxSize, BestSize, and every
other size parameter I could think of to the wanted size, but still I
get a pane which is too big with empty space around the buttons.
Thanks,
Ram.
Hi,
does simply using Fixed() along with setting the size not work?
self._mgr.AddPane(self.button_panel,
aui.AuiPaneInfo().Name("Buttons").Caption("Fixed...").Fixed().....)
There might be some interferences in some layouts (i.e. combining
fixed and non-fixed panes in a row and column and changing the size of
the docks), but generally, this would be the expected way for such
panels, I guess.
(It also might well be, that the previous glitches has been "fixed" in
the meantime)
hth,
vbr
···
2010/3/30 cool-RR <ram.rachum@gmail.com>:
I have a certain pane that I'm adding to my AUI which I want to always
stay at the same constant size. The pane is a panel of buttons of
fixed size and I don't want there to be any space around them. How do
I do this?
I have already tried setting MinSize, MaxSize, BestSize, and every
other size parameter I could think of to the wanted size, but still I
get a pane which is too big with empty space around the buttons.
Thanks,
Ram.
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
To unsubscribe from this group, send email to wxpython-users+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
The Fixed() thing doesn’t help.
Also, I changed its row neighbor to be Fixed as well, and even then it would not happen. I mean, they’re both indeed fixed and they can’t be resized, but the original widget is not display at the fixed size I specified.
Ram.
···
On Tue, Mar 30, 2010 at 12:59 PM, Vlastimil Brom vlastimil.brom@gmail.com wrote:
2010/3/30 cool-RR ram.rachum@gmail.com:
I have a certain pane that I’m adding to my AUI which I want to always
stay at the same constant size. The pane is a panel of buttons of
fixed size and I don’t want there to be any space around them. How do
I do this?
I have already tried setting MinSize, MaxSize, BestSize, and every
other size parameter I could think of to the wanted size, but still I
get a pane which is too big with empty space around the buttons.
Thanks,
Ram.
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
To unsubscribe from this group, send email to wxpython-users+unsubscribegooglegroups.com or reply to this email with the words “REMOVE ME” as the subject.
Hi,
does simply using Fixed() along with setting the size not work?
self._mgr.AddPane(self.button_panel,
aui.AuiPaneInfo().Name(“Buttons”).Caption(“Fixed…”).Fixed()…)
There might be some interferences in some layouts (i.e. combining
fixed and non-fixed panes in a row and column and changing the size of
the docks), but generally, this would be the expected way for such
panels, I guess.
(It also might well be, that the previous glitches has been “fixed” in
the meantime)
hth,
vbr
Hi,
> I have a certain pane that I'm adding to my AUI which I want to always
> stay at the same constant size. The pane is a panel of buttons of
> fixed size and I don't want there to be any space around them. How do
> I do this?
>
> I have already tried setting MinSize, MaxSize, BestSize, and every
> other size parameter I could think of to the wanted size, but still I
> get a pane which is too big with empty space around the buttons.
>
> Thanks,
> Ram.
>
> --
> To unsubscribe, send email to
> wxPython-users+unsubscribe@googlegroups.com
> or visit http://groups.google.com/group/wxPython-users?hl=en
>
> To unsubscribe from this group, send email to
> wxpython-users+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.
>
Hi,
does simply using Fixed() along with setting the size not work?
self._mgr.AddPane(self.button_panel,
aui.AuiPaneInfo().Name("Buttons").Caption("Fixed...").Fixed().....)
There might be some interferences in some layouts (i.e. combining
fixed and non-fixed panes in a row and column and changing the size of
the docks), but generally, this would be the expected way for such
panels, I guess.
(It also might well be, that the previous glitches has been "fixed" in
the meantime)
hth,
vbr
The Fixed() thing doesn't help.
Also, I changed its row neighbor to be Fixed as well, and even then it would
not happen. I mean, they're both indeed fixed and they can't be resized, but
the original widget is not display at the fixed size I specified.
MinSize() coupled with BestSize() should do the trick here, unless
your overall GUI layout is very complex: sometimes AUI can not enforce
particular sizes because of the complexity of the layout. It happened
to me too. If the MinSize()/BestSize() coupling doesn't work, there
are a couple of things you can do:
1) Provide a sample app showing the problem, so that we can play with
it and maybe find a solution;
2) Change your wx.Panel to wx.PyPanel and ovveride its DoGetBestSize
method to return whatever best size you like.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever. <==
···
On 30 March 2010 11:14, cool-RR wrote:
On Tue, Mar 30, 2010 at 12:59 PM, Vlastimil Brom <vlastimil.brom@gmail.com> > wrote:
2010/3/30 cool-RR <ram.rachum@gmail.com>:
My layout is pretty simple. I have like 4-5 panes. It’s looking much simpler than the demo app, for example.
I tried your solution number 2, subclassing PyPanel and overriding that method. Didn’t work.
I think I’m probably missing out something basic.
If you want to see my source, go here: http://github.com/cool-RR/GarlicSim/commit/e1923bbd4dd317b3d5ab2a06e375a3c11354aebd
Press the “Download Source” button on the top right of the screen. The offending widget is at garlicsim_wx/garlicsim_wx/widgets/workspace_widgets_warehouse/playback_controls/playback_controls.py
To run the code, run run_gui.py
, then File->New->life->Ok->Ok, and all the widgets will appear.
There is also a shell as part of the application, which makes it easier to debug. The main Frame is called f
in the shell, the AuiManager is f.aui_manager
, and the offending widget is f.playback_controls
.
···
On Tue, Mar 30, 2010 at 1:19 PM, Andrea Gavana andrea.gavana@gmail.com wrote:
Hi,
On 30 March 2010 11:14, cool-RR wrote:
On Tue, Mar 30, 2010 at 12:59 PM, Vlastimil Brom vlastimil.brom@gmail.com > > > wrote:
2010/3/30 cool-RR ram.rachum@gmail.com:
I have a certain pane that I’m adding to my AUI which I want to always
stay at the same constant size. The pane is a panel of buttons of
fixed size and I don’t want there to be any space around them. How do
I do this?
I have already tried setting MinSize, MaxSize, BestSize, and every
other size parameter I could think of to the wanted size, but still I
get a pane which is too big with empty space around the buttons.
Thanks,
Ram.
–
To unsubscribe, send email to
wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
To unsubscribe from this group, send email to
wxpython-users+unsubscribegooglegroups.com or reply to this email with the
words “REMOVE ME” as the subject.
Hi,
does simply using Fixed() along with setting the size not work?
self._mgr.AddPane(self.button_panel,
aui.AuiPaneInfo().Name(“Buttons”).Caption(“Fixed…”).Fixed()…)
There might be some interferences in some layouts (i.e. combining
fixed and non-fixed panes in a row and column and changing the size of
the docks), but generally, this would be the expected way for such
panels, I guess.
(It also might well be, that the previous glitches has been “fixed” in
the meantime)
hth,
vbr
The Fixed() thing doesn’t help.
Also, I changed its row neighbor to be Fixed as well, and even then it would
not happen. I mean, they’re both indeed fixed and they can’t be resized, but
the original widget is not display at the fixed size I specified.
MinSize() coupled with BestSize() should do the trick here, unless
your overall GUI layout is very complex: sometimes AUI can not enforce
particular sizes because of the complexity of the layout. It happened
to me too. If the MinSize()/BestSize() coupling doesn’t work, there
are a couple of things you can do:
- Provide a sample app showing the problem, so that we can play with
it and maybe find a solution;
- Change your wx.Panel to wx.PyPanel and ovveride its DoGetBestSize
method to return whatever best size you like.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/
==> Never EVER use RemovalGroup for your house removal. You’ll
regret it forever. <==
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
To unsubscribe from this group, send email to wxpython-users+unsubscribegooglegroups.com or reply to this email with the words “REMOVE ME” as the subject.
–
Sincerely,
Ram Rachum
Hi,
My layout is pretty simple. I have like 4-5 panes. It's looking much simpler
than the demo app, for example.
I tried your solution number 2, subclassing PyPanel and overriding that
method. Didn't work.
I think I'm probably missing out something basic.
If you want to see my source, go
here: For Andrea · cool-RR/GarlicSim@e1923bb · GitHub
Press the "Download Source" button on the top right of the screen. The
offending widget is at
`garlicsim_wx/garlicsim_wx/widgets/workspace_widgets_warehouse/playback_controls/playback_controls.py`
I didn't try your source as it is not exactly a "small runnable sample
app"... Anyway, on line 30:
self.Bind(wx.EVT_SIZE, self.on_size)
Never *ever* bind a wx.EVT_SIZE event *without* calling Skip() in the
event handler when using wxAUI or wx.lib.agw.aui (and event if you
don't use them you should always call Skip() in your event handler,
unless you are dealing with the layout and widgets positioning
yourself). I don't know if this fixes the issue or not (I think not),
but this is just a general suggestion.
Another few points: try to avoid calling Fit() and similar on the your
panel's sizer, just use sizer.Layout(). The calls to Centre() and
Show() for a panel are unnecessary.
If changing these things still doesn't work, I'll take a look at your
app but I don't promise anything: it is just too big and I believe you
should do some effort yourself to help us solving your problem.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever. <==
···
On 30 March 2010 12:49, cool-RR wrote:
I implemented all of your suggestions. (Also on some unrelated code in the project, to avoid future problems.) Still not working.
Of course I am not expecting you promise me anything regarding my code.
But now I have a question: What is the mechanism that’s supposed to prevent the free space around my fixed-size widget? Because I went to the PyAUI demo, took the “Tree Pane”, and modified it to have a .MinSize(200,200).MaxSize(200,200).BestSize(200,200).Fixed()
, and it still gets enlarged sometimes when it gets docked. Is there any mechanism at all to prevent this?
···
On Tue, Mar 30, 2010 at 3:30 PM, Andrea Gavana andrea.gavana@gmail.com wrote:
Hi,
On 30 March 2010 12:49, cool-RR wrote:
My layout is pretty simple. I have like 4-5 panes. It’s looking much simpler
than the demo app, for example.
I tried your solution number 2, subclassing PyPanel and overriding that
method. Didn’t work.
I think I’m probably missing out something basic.
If you want to see my source, go
here: http://github.com/cool-RR/GarlicSim/commit/e1923bbd4dd317b3d5ab2a06e375a3c11354aebd
Press the “Download Source” button on the top right of the screen. The
offending widget is at
garlicsim_wx/garlicsim_wx/widgets/workspace_widgets_warehouse/playback_controls/playback_controls.py
I didn’t try your source as it is not exactly a "small runnable sample
app"… Anyway, on line 30:
self.Bind(wx.EVT_SIZE, self.on_size)
Never ever bind a wx.EVT_SIZE event without calling Skip() in the
event handler when using wxAUI or wx.lib.agw.aui (and event if you
don’t use them you should always call Skip() in your event handler,
unless you are dealing with the layout and widgets positioning
yourself). I don’t know if this fixes the issue or not (I think not),
but this is just a general suggestion.
Another few points: try to avoid calling Fit() and similar on the your
panel’s sizer, just use sizer.Layout(). The calls to Centre() and
Show() for a panel are unnecessary.
If changing these things still doesn’t work, I’ll take a look at your
app but I don’t promise anything: it is just too big and I believe you
should do some effort yourself to help us solving your problem.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/
==> Never EVER use RemovalGroup for your house removal. You’ll
regret it forever. <==
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
To unsubscribe from this group, send email to wxpython-users+unsubscribegooglegroups.com or reply to this email with the words “REMOVE ME” as the subject.
–
Sincerely,
Ram Rachum
Hi,
But now I have a question: What is the mechanism that's supposed to
prevent the free space around my fixed-size widget? Because I went to the
PyAUI demo, took the "Tree Pane", and modified it to have a
`.MinSize(200,200).MaxSize(200,200).BestSize(200,200).Fixed()`, and it still
gets enlarged sometimes when it gets docked. Is there any mechanism at all
to prevent this?
Any insights about this?
There are limitations on what you can achieve with agw.aui (or wxAUI,
FWIW). It's not a perfect mechanism and I learnt to live with its
weaknesses. Most of the limitations originally present in wxAUI are in
agw.aui too, as the 2 code bases are very similar, although agw.aui
has a number of fixes and improvements over wxAUI: the latter has been
on an "abandonware" status for some time, while the pure-Python
version has benefited of the many patches sent by wxPython users over
the last year or so.
Now, to your specific problem: I am not sure what is causing this,
I'll take a look at the demo with your modifications and I'll see if I
can do something about it.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==
···
On 3 April 2010 18:46, cool-RR wrote:
On Tue, Mar 30, 2010 at 4:14 PM, cool-RR <cool-rr@cool-rr.com> wrote:
For me it’s less important now. By now I’ve already accepted that I can’t control the size of a docked widgets… That’s why I want most of my panes to float, and that’s why I’ve been worried about having a CenterPane, because I don’t want the floating panes to hide anything. (i.e. I want them to float on open space.)
So for me it’s not so important that you work on this. Thanks anyway.
Ram.
···
On Wed, Apr 7, 2010 at 6:09 PM, Andrea Gavana andrea.gavana@gmail.com wrote:
Hi,
On 3 April 2010 18:46, cool-RR wrote:
On Tue, Mar 30, 2010 at 4:14 PM, cool-RR cool-rr@cool-rr.com wrote:
But now I have a question: What is the mechanism that’s supposed to
prevent the free space around my fixed-size widget? Because I went to the
PyAUI demo, took the “Tree Pane”, and modified it to have a
.MinSize(200,200).MaxSize(200,200).BestSize(200,200).Fixed()
, and it still
gets enlarged sometimes when it gets docked. Is there any mechanism at all
to prevent this?
Any insights about this?
There are limitations on what you can achieve with agw.aui (or wxAUI,
FWIW). It’s not a perfect mechanism and I learnt to live with its
weaknesses. Most of the limitations originally present in wxAUI are in
agw.aui too, as the 2 code bases are very similar, although agw.aui
has a number of fixes and improvements over wxAUI: the latter has been
on an “abandonware” status for some time, while the pure-Python
version has benefited of the many patches sent by wxPython users over
the last year or so.
Now, to your specific problem: I am not sure what is causing this,
I’ll take a look at the demo with your modifications and I’ll see if I
can do something about it.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/
==> Never EVER use RemovalGroup for your house removal. You’ll
regret it forever.
http://thedoomedcity.blogspot.com/2010/03/removal-group-nightmare.html <==
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
To unsubscribe, reply using “remove me” as the subject.
–
Sincerely,
Ram Rachum
Hi, not that I would recommend it, but, just in case, you would have
have a similar use case, it seems to be possible to control the size
of the docked panes by manually modifying the perspective string and
loading it.
I was able to accomplish this for a simplified layout I needed
(actually only setting the width of the panel-columns, in order to
hide the CenterPane by making it as thin as possible).
This was for wx.aui but agw.aui also appears to work with that.
And, yes, I see, it is a rather dirty and error prone way, but I
wasn't able to find a clearer solution, and it does what was needed,
after all.
Regards,
vbr
···
2010/4/7 cool-RR <cool-rr@cool-rr.com>:
... By now I've already accepted that I can't
control the size of a docked widgets... That's why I want most of my panes
to float, and that's why I've been worried about having a CenterPane,
...
--
Sincerely,
Ram Rachum
Thanks for the advice Vlastimil.
Ram.
···
On Wed, Apr 7, 2010 at 9:10 PM, Vlastimil Brom vlastimil.brom@gmail.com wrote:
2010/4/7 cool-RR cool-rr@cool-rr.com:
… By now I’ve already accepted that I can’t
control the size of a docked widgets… That’s why I want most of my panes
to float, and that’s why I’ve been worried about having a CenterPane,
…
–
Sincerely,
Ram Rachum
Hi, not that I would recommend it, but, just in case, you would have
have a similar use case, it seems to be possible to control the size
of the docked panes by manually modifying the perspective string and
loading it.
I was able to accomplish this for a simplified layout I needed
(actually only setting the width of the panel-columns, in order to
hide the CenterPane by making it as thin as possible).
This was for wx.aui but agw.aui also appears to work with that.
And, yes, I see, it is a rather dirty and error prone way, but I
wasn’t able to find a clearer solution, and it does what was needed,
after all.
Regards,
vbr
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en