V Sun, 01 Nov 2009 10:15:01 +0000
Gabriele Lanaro <[email protected]> napsáno:

> M.B. wrote:
> > hi all,
> > i am trying now 'pygtksci'.
> > i create pygtkscintilla.Scintilla object like in test.py
> > but how i change font for empty [without any character] clean object
> > where all style will be applied on whole text which i write ?
> >
> > a = Source() # this is my object same as in test.py from pygtksci
> > a.set_style(1, color="Blue", font="!Terminus 8')
> > a.apply_style(1, 0, 3)  # crash. cannot apply style coz object is
> > empty
> >
> > Assertion [lengthStyle == 0 || (lengthStyle>  0&&  lengthStyle +
> > position<= style.Length())] failed
> > at ../scintilla/src/CellBuffer.cxx 399
> >
> > thanks a lot.
> > _______________________________________________
> > pygtk mailing list   [email protected]
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://faq.pygtk.org/
> >    
> Hi,
> 
> Thank you for asking!
> To change the "global" style you have to modify the style number 32 
> (STYLE_DEFAULT), and then apply style_clear_all(), in code:
> a = Source()
> a.set_style(32,color = "blue", font = "!Terminus 8")
> a.style_clear_all()
> This resets the style of the text to default.  To have complex style 
> stuff you may use an available Lexer that takes care to style 
> automatically the text. We're working on a way to implement other
> lexers directly in python.
> 
> Thank you very much also for pointing out the crash!
> 
> - Gabriele
> 
>   P.S. There's also a pygtkscintilla list :
> 
> https://lists.sourceforge.net/lists/listinfo/pygtksci-users
> 
> 
thanks subscribed.

this working but size cannot be set using font parameter
font='!Terminus 8' like i write but with size=8 parameter.

i forgot read doc :)
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to