-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrameLog.cpp
34 lines (28 loc) · 1.03 KB
/
FrameLog.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "FrameLog.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
//TFrame1 *Frame1;
//---------------------------------------------------------------------------
__fastcall TfrmeLog::TfrmeLog(TComponent* Owner)
: TFrame(Owner)
{
}
//---------------------------------------------------------------------------
void TfrmeLog::LogMessage( String Text, TColor Color )
{
RichEdit1->SetFocus();
RichEdit1->SelStart = RichEdit1->GetTextLen();
RichEdit1->SelAttributes->Color = Color;
RichEdit1->SelText = Text;
RichEdit1->Perform( EM_SCROLLCARET, 0, static_cast<NativeInt>( 0 ) );
}
//---------------------------------------------------------------------------
void __fastcall TfrmeLog::SpeedButton1Click(TObject *Sender)
{
RichEdit1->Clear();
}
//---------------------------------------------------------------------------