Interactive
BJL
Brussels, Belgium
FR 3.04 and BCB6
Since the ClickObject method has a TfrxView* Sender, there is a need to cast Sender to the type TfrxMemoView* to be able to get the content of the memo.
The compiler indicates that frxMemoView is undefined. However, the header file contains the line
#include "frxClass.hpp"
I was trying:
void __fastcall TFormStatCG::frxReport1ClickObject(TfrxView *Sender,
TMouseButton Button, TShiftState Shift, bool &Modified)
{
TrfxMemoView* SenderM = NULL;
if (dynamic_cast<TfrxMemoView*>(Sender))
{
SenderM = Sender;
...
String S = SenderM->Memo->Text;
...
}
}
Thanks
BJL
Since the ClickObject method has a TfrxView* Sender, there is a need to cast Sender to the type TfrxMemoView* to be able to get the content of the memo.
The compiler indicates that frxMemoView is undefined. However, the header file contains the line
#include "frxClass.hpp"
I was trying:
void __fastcall TFormStatCG::frxReport1ClickObject(TfrxView *Sender,
TMouseButton Button, TShiftState Shift, bool &Modified)
{
TrfxMemoView* SenderM = NULL;
if (dynamic_cast<TfrxMemoView*>(Sender))
{
SenderM = Sender;
...
String S = SenderM->Memo->Text;
...
}
}
Thanks
BJL
Comments
void __fastcall TFormStatCG::frxReport1ClickObject(TfrxView *Sender,
TMouseButton Button, TShiftState Shift, bool &Modified)
{
if (dynamic_cast<TfrxMemoView*>(Sender))
{
if (dynamic_cast<TfrxMemoView*>(Sender)->Name == "MemoCpte"
&& GraphCptes.Pos(dynamic_cast<TfrxMemoView*>(Sender)->Text) == 0)
{
String S = dynamic_cast<TfrxMemoView*>(Sender)->Text;
S = S.SubString(1, S.Pos("\r\n") - 1);
GraphCptes += S + ",";
}
}
}
BJL