RTF2 control: RTFheight hides cursor

  • Thread starter Thread starter brusch
  • Start date Start date
B

brusch

Hello,
when I use RTFheight in the Change-Event, the cursor disappears.

It is still there, but invisible. How can I get my cursor back?

Michael Bruschkewitz
 
I don't see that behaviour here. WHy would you be using the RTFHeight
property to set the Height of the control in the Change event?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Stephen said:
I don't see that behaviour here. WHy would you be using the RTFHeight
property to set the Height of the control in the Change event?

The form displays teststeps (action, reaction) for a testcase. It looks
like:
1 ctrl1(action 1) ctrl2(reaction 1)
2 ctrl3(action 2) ctrl4(reaction 2)
3 ctrl5(action 3) ctrl6(reaction 3)
....
I have multiple RTF2-controls for the actions/reactions in this form
which are dynamically resized.
The actions/reactions contain only a few lines and are limited in width
so I avoid using scrollbars by setting the size of the control to its
RTFheight.
When a control changes its size, the following steps are moved.
So I get sort of a table which looks like a table in a text processor.

My way is as follows:
Store RTFheight when control text is first assigned.
In Change (pseudo):
h = ctrl.RTFHeight
if oldHeight <> h then resize

If I replace "h = ctrl.RTFheight" by "h = oldHeight" then the cursor
remains visible.
This behaviour occurs even when the size is not changed (resize not
called).
So, the only difference between Cursor visible or not is the call of
RTFheight.

However, the cursor is still there, if I enter a letter, this appears
at the expected location.

If I change the focus to another application (Alt-Tab) and back, the
cursor is visible.

This is Access 2003 SP2 on Win2000P SP4

Regards,
Michael Bruschkewitz
 
Afer you resize try setting focus to another control and then immediately
back to the RTF2 control.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top