help with style and font in wxTextCtrl

hi i writting my application with this lines

        editor = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE|
wx.TE_RICH2|wx.HSCROLL)
        editor.SetBackgroundColour("Black")

        font = wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD, False)
        editor.GetFont().GetPointSize()
        editor.SetStyle(44, 52, wx.TextAttr("Green", wx.NullColour,
font))
and whe selct all and clear back to the default style and i want know
how fix this
can you help me?

Hi,
the code seems to be working for me, e.g. setting a font and colour
for a portion of text in a TextCtrl;
I'm not sure what the line
editor.GetFont().GetPointSize()
was meant for, in this form it doesn't do anything useful.

I belive, the uniform colours of the selected text (background as well
as font) are standard for this widget; (at least on windows?)

You can distinguish the colours even in selection e.g. in
StyledTextCtrl, but it has other limitations (number of styles used
...)

hth,
  vbr

···

2009/12/10 iozk_Live <iozk117@gmail.com>:

hi i writting my application with this lines

   editor = wx\.TextCtrl\(self, \-1, style=wx\.TE\_MULTILINE|

wx.TE_RICH2|wx.HSCROLL)
editor.SetBackgroundColour("Black")

   font = wx\.Font\(10, wx\.DEFAULT, wx\.NORMAL, wx\.BOLD, False\)
   editor\.GetFont\(\)\.GetPointSize\(\)
   editor\.SetStyle\(44, 52, wx\.TextAttr\(&quot;Green&quot;, wx\.NullColour,

font))
and whe selct all and clear back to the default style and i want know
how fix this
can you help me?

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en