wx.richtext query

Hi,

I am using wx.richtext as a log viewer. It's read only. When user
clicks on richtext cursor blinks/move at click
position and next time messages are printed from click/cursor
position. I need to prevent this cursor click thing.
How do I do this?

Prashant
Python 2.6.2
wxPython 2.8.10.1
XP 32

King wrote:

Hi,

I am using wx.richtext as a log viewer. It's read only. When user
clicks on richtext cursor blinks/move at click
position and next time messages are printed from click/cursor
position. I need to prevent this cursor click thing.
How do I do this?

Prashant
Python 2.6.2
wxPython 2.8.10.1
XP 32

I think richtext_ctrl.GetCaret().Hide() should work, but I've never used those methods.

···

--
Steven Sproat, BSc
http://www.basicrpg.com/

I think richtext_ctrl.GetCaret().Hide() should work, but I've never used
those methods.

It only hides the cursor and does not stop the behavior mentioned
above. Still if you click some where, the caret is not visible but
line gets printed from click/caret
position.

Prashant
Python 2.6.2
wxPython 2.8.10.1
XP 32

Hi,

I think richtext_ctrl.GetCaret().Hide() should work, but I've never used
those methods.

It only hides the cursor and does not stop the behavior mentioned
above. Still if you click some where, the caret is not visible but
line gets printed from click/caret
position.

You haven't mentioned how your putting text in to the control, so here are some guesses on what your probably not doing.

1) Using AppendText should cause the text to be added to the end of the document and not at the cursor position.

OR

2) Clicking elsewhere in the control will cause the InsertionPoint to change, so before adding text make sure that the insertion point is at the end of the control. SetInsertionPoint(GetLastPosition()).

Cody

···

On Jan 9, 2010, at 9:22 PM, King wrote: