Page 1 of 1

Mailmerge-freestyle Example

Posted: Thu Jan 08, 2015 9:50 pm
by PioPio
Hello Sergey,

I have downloaded your example "mailmerge-freestyle" and added one button and a TActionManager. I assigned the following properties:

Code: Select all

  object Button3: TButton
    Left = 547
    Top = 10
    Width = 75
    Height = 25
    Action = rvActionFontBold
    TabOrder = 2
  end

    object ActionManager1: TActionManager
    Left = 336
    Top = 224
    StyleName = 'Platform Default'
    object rvActionFontBold: TrvActionFontBold
      Category = 'RVE Text'
      Caption = '&Bold'
      ImageIndex = 14
      ShortCut = 16450
    end
  end


I compiled and ran the example. I added a new sentence in TRichViewEdit and added a tag "code" in the middle of it by pressing "Insert Customer Code".
Finally I selected the whole line I inserted and clicked on Button3. The line was converted in Bold except the tag.

How can I solve this ?

Many thanks
PioPio

Posted: Fri Jan 09, 2015 10:21 am
by Sergey Tkachenko
Remove rvprStyleProtect from the Protection of the field style.
(see TForm1.GetFieldStyleNo in TEMainFrm)

Posted: Fri Jan 09, 2015 10:30 am
by PioPio
Sergey Tkachenko wrote:Remove rvprStyleProtect from the Protection of the field style.
(see TForm1.GetFieldStyleNo in TEMainFrm)
Thank you, Sergey,

I was thinking if there are any side effects in doing so.

Posted: Fri Jan 09, 2015 10:37 am
by Sergey Tkachenko
There must not be side effects.
All text style operations in TRichViewEdit and RichViewActions create new styles basing on existing styles, so other protection properties will be retained.