Skip to content
Snippets Groups Projects
Commit 4100deed authored by rswindell's avatar rswindell
Browse files

Force the input cursor to always at the end of the text (Memo) box.

parent e23d8c22
No related branches found
No related tags found
No related merge requests found
...@@ -307,3 +307,12 @@ void __fastcall TMainForm::FormCreate(TObject *Sender) ...@@ -307,3 +307,12 @@ void __fastcall TMainForm::FormCreate(TObject *Sender)
void __fastcall TMainForm::LocalEnter(TObject *Sender)
{
Local->SelLength=0;
Local->SelStart=Local->Text.Length();
}
//---------------------------------------------------------------------------
object MainForm: TMainForm object MainForm: TMainForm
Left = 564 Left = 787
Top = 184 Top = 244
Width = 417 Width = 417
Height = 251 Height = 251
Caption = 'Synchronet Chat' Caption = 'Synchronet Chat'
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -14 Font.Height = -11
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
Font.Style = [] Font.Style = []
OldCreateOrder = False OldCreateOrder = False
...@@ -15,26 +15,26 @@ object MainForm: TMainForm ...@@ -15,26 +15,26 @@ object MainForm: TMainForm
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
PixelsPerInch = 120 PixelsPerInch = 96
TextHeight = 16 TextHeight = 13
object Splitter1: TSplitter object Splitter1: TSplitter
Left = 0 Left = 0
Top = 105 Top = 85
Width = 409 Width = 401
Height = 2 Height = 2
Cursor = crVSplit Cursor = crVSplit
Align = alTop Align = alTop
end end
object Local: TMemo object Local: TMemo
Left = 0 Left = 0
Top = 107 Top = 87
Width = 409 Width = 401
Height = 116 Height = 126
Align = alClient Align = alClient
Color = clBlack Color = clBlack
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clLime Font.Color = clLime
Font.Height = -15 Font.Height = -12
Font.Name = 'System' Font.Name = 'System'
Font.Pitch = fpFixed Font.Pitch = fpFixed
Font.Style = [] Font.Style = []
...@@ -43,19 +43,21 @@ object MainForm: TMainForm ...@@ -43,19 +43,21 @@ object MainForm: TMainForm
ScrollBars = ssVertical ScrollBars = ssVertical
TabOrder = 0 TabOrder = 0
WantTabs = True WantTabs = True
OnClick = LocalEnter
OnEnter = LocalEnter
OnKeyPress = LocalKeyPress OnKeyPress = LocalKeyPress
end end
object Remote: TMemo object Remote: TMemo
Left = 0 Left = 0
Top = 0 Top = 0
Width = 409 Width = 401
Height = 105 Height = 85
TabStop = False TabStop = False
Align = alTop Align = alTop
Color = clBlack Color = clBlack
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clGreen Font.Color = clGreen
Font.Height = -15 Font.Height = -12
Font.Name = 'System' Font.Name = 'System'
Font.Pitch = fpFixed Font.Pitch = fpFixed
Font.Style = [] Font.Style = []
......
...@@ -61,6 +61,7 @@ __published: // IDE-managed Components ...@@ -61,6 +61,7 @@ __published: // IDE-managed Components
void __fastcall InputTimerTick(TObject *Sender); void __fastcall InputTimerTick(TObject *Sender);
void __fastcall TimerTick(TObject *Sender); void __fastcall TimerTick(TObject *Sender);
void __fastcall FormCreate(TObject *Sender); void __fastcall FormCreate(TObject *Sender);
void __fastcall LocalEnter(TObject *Sender);
private: // User declarations private: // User declarations
public: // User declarations public: // User declarations
__fastcall TMainForm(TComponent* Owner); __fastcall TMainForm(TComponent* Owner);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment