[Tkinter-discuss] Changing the fonts on my Pmw.NoteBook tabs
Peter Milliken
PeterM at resmed.com.au
Tue Jul 20 23:04:58 CEST 2004
The following is under the "Dynamic Components" section of the reference
page for Pmw.NoteBook:
"Page and tab components are created dynamically by the add() and insert()
methods. By default, the pages are of type Tkinter.Frame and are created
with a component group of Page and the tabs are of type Tkinter.Button and
are created with a component group of Tab."
Using this information as a "clue" :-), you can use calls to get the
components of the NoteBook i.e. assuming your notebook instance was called
"DisplayPages" and it had tabbed pages called "Entry", "Results" then you
would have the following
print self.component("DisplayPages").components()
['Entry', 'Entry-tab', 'Results', 'Results-tab', 'hull']
So the Frame component for the Entry tabbed page is called 'Entry' and the
Button that contains the name (and font you want to manipulate) is called
'Entry-tab'. So to change the font is something like this:
self.component('DisplayPages').component('Entry-tab').configure(font =
('Helvetica', 10, 'bold italic'))
This is probably more detail than you were asking for but hey, what the
hell! :-)
Regards
Peter
-----Original Message-----
From: Netherdog at cs.com [mailto:Netherdog at cs.com]
Sent: Tuesday, July 20, 2004 2:57 PM
To: tkinter-discuss at python.org
Cc: clnethery at juno.com
Subject: [Tkinter-discuss] Changing the fonts on my Pmw.NoteBook tabs
Hello everyone. It has been awhile since I have requested the sound advice
of my esteemed Tkinter colleagues, but once again I am stumped. Regarding
the use of the Pmw.NoteBook widget, I am trying to set/change the fonts for
my notebook tabs, but cannot seem to figure out how to do it. Since
Pmw.NoteBook has only one component, 'Hull', and no 'entry' component, for
example, I am truly at a loss as to how this can be accomplished. Any ideas
on this one?
Thanking you in advance,
Chris Nethery
Warning: Copyright ResMed. Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those
materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.
This communication is confidential and may contain legally privileged information.
By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal
privilege in,the content of the email and of any attachments.
If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 9886 5000 Sydney, Australia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20040721/85c1c015/attachment.html
More information about the Tkinter-discuss
mailing list