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 11:26AM
    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 11:26AM
    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 11:26AM
    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 11:26AM
    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