CollapsiblePane - Changing font and/or colour of label

Hi,

I am using the CollapsiblePane class and would very muchlike to change the
font or colour of the label (when the pane is collapsed).

SetForegroundColor seems to change the colour of the "arrow" only
SetBackgroundColor seems to change the "mouseover" background only
SetFont seems to have no effect at all

Is there any way to access the label widget itself? CollapsiblePane.Label
is the a unicode object, so that's not it...

Any help appreciated. I have a list of two different kinds of items, both
in collapsible panes, and I need to somehow let the user distinguish
between them.

Thanks,
Andrew

For the records, CollapsiblePane.GetPane().SetBackgroundColor() works
(even when collapsed); haven't found the foreground yet, but assume I may
need to dig into the pane's contents.

Andrew

···

Hi,

I am using the CollapsiblePane class and would very muchlike to change the
font or colour of the label (when the pane is collapsed).

SetForegroundColor seems to change the colour of the "arrow" only
SetBackgroundColor seems to change the "mouseover" background only
SetFont seems to have no effect at all

Is there any way to access the label widget itself? CollapsiblePane.Label
is the a unicode object, so that's not it...

Any help appreciated. I have a list of two different kinds of items, both
in collapsible panes, and I need to somehow let the user distinguish
between them.

Thanks,
Andrew

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Ever onwards: it seems that whatever is returned by GetPane() has only the
english-english (ColoUUUUUUUUUr) methods implemented.

I can now set background colour everywhere and font in the expanded area,
by iterating over various object trees. What I really want - font or
foreground colour when collapsed - still doesn't seem to be possible
though.

Andrew

···

For the records, CollapsiblePane.GetPane().SetBackgroundColor() works
(even when collapsed); haven't found the foreground yet, but assume I may
need to dig into the pane's contents.

Andrew

Hi,

I am using the CollapsiblePane class and would very muchlike to change
the
font or colour of the label (when the pane is collapsed).

SetForegroundColor seems to change the colour of the "arrow" only
SetBackgroundColor seems to change the "mouseover" background only
SetFont seems to have no effect at all

Is there any way to access the label widget itself?
CollapsiblePane.Label
is the a unicode object, so that's not it...

Any help appreciated. I have a list of two different kinds of items,
both
in collapsible panes, and I need to somehow let the user distinguish
between them.

Thanks,
Andrew

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Hi Andrew,

Ever onwards: it seems that whatever is returned by GetPane()
has only the english-english (ColoUUUUUUUUUr) methods implemented.

I believe this is the correct way: having the double spelling is not a tremendous idea IMHO. Although I used to use the mixed american-english spelling in my wxPython code for "Color"/"Colour", I believe Robin is thinking to remove this double way of expressing the methods.

I can now set background colour everywhere and font in the
expanded area, by iterating over various object trees. What
I really want - font or foreground colour when collapsed -
still doesn't seem to be possible though.

You may give a try to my implementation of CollapsiblePane, termed "PyCollapsiblePane" on my widgets page:

http://xoomer.alice.it/infinity77/main/freeware.html#pycollapsiblepane

(I am citing the web page by memory, I do not have external internet access here in Kazakhstan, so I apologize if the web link is not correct).

It is basically a Python implementation of CollapsiblePane, with the same functionalities and a couple of enhancements. The obvious advantage is that it's Python code, and you can tinker it as much as you want to get the results you wish :-D.

Andrea.

···

_____________________________________________
Andrea Gavana (gavana@kpo.kz)
Reservoir Engineer
KPDL
Cardinal Place
80, Victoria Street
SW1E 5JL London

Direct Tel: +44 (0) 20 717 08936
Mobile Tel: +44 (0) 77 487 70534
Fax: +44 (0) 20 717 08900
Web: http://xoomer.alice.it/infinity77/index.html
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Andrew

> For the records,
CollapsiblePane.GetPane().SetBackgroundColor() works
> (even when collapsed); haven't found the foreground yet,
but assume I
> may need to dig into the pane's contents.
>
> Andrew
>
>
>> Hi,
>>
>> I am using the CollapsiblePane class and would very muchlike to
>> change the font or colour of the label (when the pane is
collapsed).
>>
>> SetForegroundColor seems to change the colour of the "arrow" only
>> SetBackgroundColor seems to change the "mouseover" background only
>> SetFont seems to have no effect at all
>>
>> Is there any way to access the label widget itself?
>> CollapsiblePane.Label
>> is the a unicode object, so that's not it...
>>
>> Any help appreciated. I have a list of two different
kinds of items,
>> both in collapsible panes, and I need to somehow let the user
>> distinguish between them.
>>
>> Thanks,
>> Andrew
>>
>>
>> _______________________________________________
>> wxpython-users mailing list
>> wxpython-users@lists.wxwidgets.org
>> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>>
>>
>
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users@lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

----------------------------------------------------------------------------------
This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, please advise us immediately if you are not the named addressee or the person responsible for delivering the message to the named addressee. The contents should not be disclosed to any other person nor copies taken. Unless expressly stated, any views, whether express or implied, are the sender's personal views, do not necessarily reflect the views of KPO or any of its directors and are not approved by KPO Group and this email is not an offer, solicitation, recommendation or agreement of any kind.

Thanks very much! I finally looked at the C++ code and realised I would
never be able to do what I wanted (the Button is a private instance
variable) so had decided to implement CollapsiblePane in Python today...
Now I will use your code (and perhaps modify it) (assuming the licence is
OK - this is commercial work). So you have saved me significant work.

Cheers,
Andrew

···

Hi Andrew,

Ever onwards: it seems that whatever is returned by GetPane()
has only the english-english (ColoUUUUUUUUUr) methods implemented.

I believe this is the correct way: having the double spelling is not a
tremendous idea IMHO. Although I used to use the mixed american-english
spelling in my wxPython code for "Color"/"Colour", I believe Robin is
thinking to remove this double way of expressing the methods.

I can now set background colour everywhere and font in the
expanded area, by iterating over various object trees. What
I really want - font or foreground colour when collapsed -
still doesn't seem to be possible though.

You may give a try to my implementation of CollapsiblePane, termed
"PyCollapsiblePane" on my widgets page:

http://xoomer.alice.it/infinity77/main/freeware.html#pycollapsiblepane

(I am citing the web page by memory, I do not have external internet
access here in Kazakhstan, so I apologize if the web link is not correct).

It is basically a Python implementation of CollapsiblePane, with the same
functionalities and a couple of enhancements. The obvious advantage is
that it's Python code, and you can tinker it as much as you want to get
the results you wish :-D.

Andrea.

_____________________________________________
Andrea Gavana (gavana@kpo.kz)
Reservoir Engineer
KPDL
Cardinal Place
80, Victoria Street
SW1E 5JL London

Direct Tel: +44 (0) 20 717 08936
Mobile Tel: +44 (0) 77 487 70534
Fax: +44 (0) 20 717 08900
Web: http://xoomer.alice.it/infinity77/index.html
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Andrew

> For the records,
CollapsiblePane.GetPane().SetBackgroundColor() works
> (even when collapsed); haven't found the foreground yet,
but assume I
> may need to dig into the pane's contents.
>
> Andrew
>
>
>> Hi,
>>
>> I am using the CollapsiblePane class and would very muchlike to
>> change the font or colour of the label (when the pane is
collapsed).
>>
>> SetForegroundColor seems to change the colour of the "arrow" only
>> SetBackgroundColor seems to change the "mouseover" background only
>> SetFont seems to have no effect at all
>>
>> Is there any way to access the label widget itself?
>> CollapsiblePane.Label
>> is the a unicode object, so that's not it...
>>
>> Any help appreciated. I have a list of two different
kinds of items,
>> both in collapsible panes, and I need to somehow let the user
>> distinguish between them.
>>
>> Thanks,
>> Andrew
>>
>>
>> _______________________________________________
>> wxpython-users mailing list
>> wxpython-users@lists.wxwidgets.org
>> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>>
>>
>
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users@lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

----------------------------------------------------------------------------------
This e-mail is intended only for the addressee named above. As this
e-mail may contain confidential or privileged information, please advise
us immediately if you are not the named addressee or the person
responsible for delivering the message to the named addressee. The
contents should not be disclosed to any other person nor copies taken.
Unless expressly stated, any views, whether express or implied, are the
sender's personal views, do not necessarily reflect the views of KPO or
any of its directors and are not approved by KPO Group and this email is
not an offer, solicitation, recommendation or agreement of any kind.

Hi,

···

On Fri, Dec 5, 2008 at 10:11 AM, andrew cooke wrote:

Thanks very much! I finally looked at the C++ code and realised I would
never be able to do what I wanted (the Button is a private instance
variable) so had decided to implement CollapsiblePane in Python today...
Now I will use your code (and perhaps modify it) (assuming the licence is
OK - this is commercial work).

The license is the same as the wxPython one. Obviously, if you
contribute back your enhancements it would be much appreciated by me
and by the wxPython community.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Gee, this answered a problem I ran into today.

Here's my very bad form workaround:
cp = PCP.PyCollapsiblePane(self, label=term.get('quarter'),
style=PCP.CP_GTK_EXPANDER|wx.CP_NO_TLW_RESIZE)

cp.Children[0].SetFont(wx.Font(14, wx.FONTFAMILY_SWISS,
         wx.FONTSTYLE_NORMAL , wx.FONTWEIGHT_NORMAL )

Yeah, I know. It's ugly.

To bad PCP.PyCollapsiblePane.GetGtxWidget returns 0.

So instead, I went into the pycollapsiblepane.py file and added this method:

    def SetButtonFont(self, font):
        self._pButton.SetFont(font)
        self.Layout()

right above the SetLabel method.

It works at least for the GTK Expander.

Thanks for the hints on how to be brave with modifying code.

Josh English

···

On Fri, Dec 5, 2008 at 2:11 AM, andrew cooke <andrew@acooke.org> wrote:

Thanks very much! I finally looked at the C++ code and realised I would
never be able to do what I wanted (the Button is a private instance
variable) so had decided to implement CollapsiblePane in Python today...
Now I will use your code (and perhaps modify it) (assuming the licence is
OK - this is commercial work). So you have saved me significant work.

Cheers,
Andrew

--
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com

Hi,

2009/11/5 Josh English:

Gee, this answered a problem I ran into today.

Here's my very bad form workaround:
cp = PCP.PyCollapsiblePane(self, label=term.get('quarter'),
style=PCP.CP_GTK_EXPANDER|wx.CP_NO_TLW_RESIZE)

cp.Children[0].SetFont(wx.Font(14, wx.FONTFAMILY_SWISS,
wx.FONTSTYLE_NORMAL , wx.FONTWEIGHT_NORMAL )

Yeah, I know. It's ugly.

To bad PCP.PyCollapsiblePane.GetGtxWidget returns 0.

So instead, I went into the pycollapsiblepane.py file and added this method:

def SetButtonFont(self, font):
self._pButton.SetFont(font)
self.Layout()

right above the SetLabel method.

It works at least for the GTK Expander.

Thanks for the hints on how to be brave with modifying code.

I have added SetButtonFont and GetButtonFont methods to the SVN
version of PyCollapsibelPane.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
http://thedoomedcity.blogspot.com/

You rock!

···

On Thu, Nov 5, 2009 at 4:26 AM, Andrea Gavana <andrea.gavana@gmail.com> wrote:

I have added SetButtonFont and GetButtonFont methods to the SVN
version of PyCollapsibelPane.

Andrea.

--
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com