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

hyena hyena at
Sun Sep 30 15:38:04 CEST 2007

kyosohma at 写道:
> On Sep 12, 10:26 am, "hyena" <a... at> wrote:
>> 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
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.

More information about the Python-list mailing list