wxRTC search char. and change colour

Hi!

Is it possible to search in the text of a wxRichTextCtrl for certain characters and to change the colour of them? With SetSelection it'll become to complicated because I don't know the positions.

example:

------------------>>>>>>---------------

I want to change the colour of all > (data set is quite huge).
Since I split severall strings at certain position, I don't know the positions of the > in advance. For instance I have 5 * a string of 3000 characters with 10 times a string of > (of different lengths) inside. This 5 strings will be splitted after 1000 character each. So the positions are gone.

The best would be to search and change the colour.

Thanks in advance!
Stefanie

lueck@ipk-gatersleben.de wrote:

Hi!

Is it possible to search in the text of a wxRichTextCtrl for certain characters and to change the colour of them? With SetSelection it'll become to complicated because I don't know the positions.

example:

------------------>>>>>>---------------

I want to change the colour of all > (data set is quite huge).
Since I split severall strings at certain position, I don't know the positions of the > in advance. For instance I have 5 * a string of 3000 characters with 10 times a string of > (of different lengths) inside. This 5 strings will be splitted after 1000 character each. So the positions are gone.

The best would be to search and change the colour.

You can get the full text of the document from the control, and then search that and find the positions that you want to set attributes for.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!