How to set TMemoView Frame Types in script

How does one set a Memo's
Memo->Frame->Typ = [ftBottom,ftTop,ftRight,ftLeft]
using code?

Also how do you set the Memo->Font->Style << fsBold , Bold, Underline style settings using code?

Any help most appreciated



Comments

  • edited 8:32AM
    Hello,

    i use Basic-Script:
    'set Font-Style
    Memo.font.Style = fsBold + fsitalic
    'Remove Font-Style
    Memo.font.style = 0
    'Set Borderstyle                               
    Memo.frame.typ =  ftTop + ftBottom + ftLeft + ftRight
    'Remove Borderstyle
    Memo.frame.typ = 0
    

    In Pascal
    Memo.Font.Style := fsBold+fsItalic
    

    Greetz
  • edited 8:32AM
    Thanks SlashMaster

    I tried the equivalent in C++

    Memo->Frame->Typ = ftTop + ftBottom + ftLeft + ftRight;

    but it would not compile with error message

    [bcc32 Error] OSSMainFRReport.cpp(1264): E2034 Cannot convert 'int' to 'TfrxFrameTypes'

    and the same for the Style Setting

    Memo->Font->Style = fsBold;

    gave the following compile error

    [bcc32 Error] OSSMainFRReport.cpp(1212): E2034 Cannot convert 'TFontStyle' to 'TFontStyles'

    I would have thought the same method would work in Pascal as C++.


  • edited 8:32AM
    Ive got an answer on the Font Styles.

    This works for C++

    Memo->Font->Style = TFontStyles();
    Memo->Font->Style = Font->Style << fsBold;

    But I still can't get the Frame Types to work in C++

    Any help would be appreciated.
  • gpigpi
    edited 8:32AM
    wrote:
    But I still can't get the Frame Types to work in C++
    Use
    TfrxMemoView * Memo;
    Memo = (TfrxMemoView *)frxReport1->FindObject("Memo1");
    Memo->Frame->Typ = TfrxFrameTypes();
    Memo->Frame->Typ = Memo->Frame->Typ << ftTop << ftBottom;
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.