[scribus] Settting style to a selection

Cédric Gémy radar.map35 at free.fr
Fri Sep 3 13:40:51 CEST 2010


Hello again

i got this :
import re
		pattern="AFE"
		aString=getAllText()
		for match in re.finditer(pattern,aString):
			#print match.start()
			selectText(match.start(),1)
			setStyle("people",getSelectedObject())

It works fine in python interpreter, and string match perfectly :)
Unfortunately, in Scribus, it looks as if the selected text was not the
good. It appear to me that the selectText method remembers which text
was selected previously and applies the style to it disregarding what
match says.
I tryed to unselect first with selectText(0,0) but it didn't seem to
work more.

pygmee




More information about the scribus mailing list