Page 1 of 1

How To Get rvaInsertSymbol To Put Symbol In Last-focused RVE

Posted: Wed Oct 18, 2006 12:28 am
by DickBryant
A similar question for the sub/superscript question I've asked below (still need an answer for that one :-)).

I have several rve's on a form along with a set of buttons to call various actions. Most of the buttons work fine and apply the action to whichever of the rve's was in focus before pressing the button.

However, when I call insert symbol the symbol is always inserted into the
the last cursor position of the first rve on the form, even if the cursor was last positioned in one of the other rve's just prior to calling insert symbol.

How to get the insertsymbol action to insert the symbol in the cursor position of the last-focussed rve on the form?

Posted: Wed Oct 18, 2006 1:14 am
by DickBryant
I don't understand this one... I had the rvAction assigned to a TBitBtn button on a separate panel (on the same form, though) and it had the problem described above.

I decided to 'just try' assigning the same action to a TToolBarButton added to the TToolBar that the other action buttons are on and it worked just fine....

Go figure...

Posted: Wed Oct 18, 2006 7:04 am
by Sergey Tkachenko
I think this is because when you click TBitBtn, the focused control is not TRichViewEdit, but this button itself. TToolBarButton cannot have input focus.
So either use controls that cannot acquire focus, or assign TRVControlPanel.DefaultControl to the proper editor.

Posted: Wed Oct 18, 2006 12:47 pm
by DickBryant
OK, that makes sense - thanks for the information, Sergey.