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

General TRichView support forum. Please post your questions here
Post Reply
DickBryant
Posts: 148
Joined: Wed Dec 07, 2005 2:02 pm
Contact:

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

Post 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?
DickBryant
Posts: 148
Joined: Wed Dec 07, 2005 2:02 pm
Contact:

Post 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...
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
DickBryant
Posts: 148
Joined: Wed Dec 07, 2005 2:02 pm
Contact:

Post by DickBryant »

OK, that makes sense - thanks for the information, Sergey.
Post Reply