[wxPython-users] change font for wx.CollapsiblePane label
Andrea Gavana
andrea.gavana at gmail.com
Thu Nov 1 17:24:09 PDT 2007
Hi All,
On 11/2/07, Robin Dunn wrote:
> Patrick J. Anderson wrote:
> > I was wondering if changing pane label font can be done after
> > wx.CollapsiblePane is instantiated?
>
> Since it wraps a native widget on wxGTK then it might work there, but I
> doubt it will on the other platforms. On the other platforms it is
> composed of several widgets and if it wasn't designed to pass the
> SetFont call to the button widget then you're out of luck.
>
> Unless, of course, you don't mind cheating. ;-) You can get access to
> the button by learning about how the composite widgets are put together,
> which can easily be discovered with the widget inspection tool in the
> demo. In this case it is as easy as
>
> btn = collPane.GetChildren()[0]
> btn.SetFont(...)
>
> Keep in mind that this won't work on wxGTK since the composite widget is
> not used there.
You also might take a look at PyCollapsiblePane, which is my
translation to pure Python of the original C++ implementation in
wxWidgets:
http://xoomer.alice.it/infinity77/main/freeware.html#pycollapsiblepane
It might be of some help.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
More information about the wxpython-users
mailing list