Hi guys,
How can I make a caret go to the end of the line ???
Here is my code so far:
BobbaFet
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
"<beer brand> is like making love in a cano...
it's <f-word + ing> close to water !!!"
- Monty Python's Flying Circus, 1969/70
How can I make a caret go to the end of the line ???
Here is my code so far:
Code:
procedure TForm1.Memo1KeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
PrevLine, CurrLine: Integer;
NeededPos: Integer;
bs: integer;
MyString: String;
begin
if Key = Word(VkKeyScan(#13)) then // scan for pressing enter key
begin
PrevLine := Memo1.CaretPos_V - 1;
CurrLine := Memo1.CaretPos_V;
MyString := Memo1.Lines.Strings[PrevLine];
NeededPos := Length(MyString) - Length(TrimLeft(MyString));
Memo1.Lines[CurrLine]:= StringOfChar(' ',NeededPos);
/* Code for going to end of CurrLine */
end;
end;
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
"<beer brand> is like making love in a cano...
it's <f-word + ing> close to water !!!"
- Monty Python's Flying Circus, 1969/70