[wxPython-users] General layout strategy questions
Jorgen Bodde
jorgen.maillist at gmail.com
Thu Oct 5 01:25:50 PDT 2006
Hi Andrea,
I am looking forward to your control, as i wanted to have something that
could act as a "history panel" .. In GTK in the file browser they show
something like;
[home] [jorg] [somedir]
----------------------------------
dir contents
You can click on the jorg button and it will quickly change the dir. In my
wiki project I wanted to emulate the same behaviour, by remembering the
pages one visited in a history panel. Your buttonpanel can function as
something like that.
A small question, can your button panel handle buttons of variying width?
5) Possibility to add stretchable spacers between buttons that allows you to
> align buttons almost in every way you wish (no idea on how to do it);
>
Well why don't you derive the fancy buttons from a class that is derived
from e.g. wxPanel or wxControl ? That is how I did it with wxCaptionBar in
the wxFoldPanel component. Every button can report the size it needs to the
sizer by GetBestSize, this way the panel can hold sizers. My solution would
be;
the fancy background would be a wxPanel
One sizer can be assigned to it, either H sizer or V sizer (using a V sizer
would allow buttons on the side)
The sizer contains the controls that are the fancy buttons
If the sizer is set to wxALIGN_LEFT it will allign on the left,
wxALIGN_RIGHT it will be aligned on the right etc.
6) Adding support of wx.Control inside ButtonPanel (no idea on how to do
> it);
>
That would be possible when your group of controls in your fancy button
panel would become wxWindow derived controls (you are basically half way
there when your custom drawn buttons become wxControls / wxWindows) if you
add something else to the list, the sizer would be able to pick them up as
extra controls.
- Jorgen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200610=
05/bbbfd354/attachment.htm
More information about the wxpython-users
mailing list