is it possible to use different font within one wxpython static text widget?

H

hyena

problem is as title, bear me if this too silly or too naive.

I use wx.statictext widget to show some information in GUI, there are some
numbers in the text to be emphasized in bigger other color. For example, in
sentence "the travel speed of this car is 40 km /hour", I would like "40" to
be bigger and in red color. I know I can use several statictext to get this
effect. But i am quite relucktant to do so since I am quite unfamiliar with
manageing the layout of widgets.

Is there a convinient way to have this done? Thanks for any .input
 
K

kyosohma

problem is as title, bear me if this too silly or too naive.

I use wx.statictext widget to show some information in GUI, there are some
numbers in the text to be emphasized in bigger other color. For example, in
sentence "the travel speed of this car is 40 km /hour", I would like "40" to
be bigger and in red color. I know I can use several statictext to get this
effect. But i am quite relucktant to do so since I am quite unfamiliar with
manageing the layout of widgets.

Is there a convinient way to have this done? Thanks for any .input


Without knowing what kind of interface you're making, I can only shoot
in the dark. From your question, I would think that the FancyText
widget would suffice. Other widgets that would be harder to use would
be the StyledTextCtrl and the HtmlWindow (which I use for About
dialogs).

Check out the wxPython Demo for sample code on each of these widgets
and sizers. Also see the Wiki for tips and tricks on using Sizers.
There's a new SizedControl that's supposed to simplify creating
layouts, although I haven't used it. And there's also XRC too.

Mike
 
H

hyena

(e-mail address removed) дµÀ:
Without knowing what kind of interface you're making, I can only shoot
in the dark. From your question, I would think that the FancyText
widget would suffice. Other widgets that would be harder to use would
be the StyledTextCtrl and the HtmlWindow (which I use for About
dialogs).

Check out the wxPython Demo for sample code on each of these widgets
and sizers. Also see the Wiki for tips and tricks on using Sizers.
There's a new SizedControl that's supposed to simplify creating
layouts, although I haven't used it. And there's also XRC too.

Mike
Sorry did not check this group for a while. Thanks Mike for your input.
I will go take a look at the fancytext widget.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top