Вниз
Скачать: CL | DM;

Помогите с Selection в Memo.   Найти похожие ветки 

 
Sagrer   (2003-11-04 19:37) [0]

В общем такой код

Procedure CheckSelection;
begin
//Проверялка селекта в меме текстофайла...
If MainF.TxtFileMemo.Focused = true then begin
If MainF.TxtFileMemo.SelLength > 0 then begin
If TextSelected = false then begin
TextSelected := true;
TextSelStart := MainF.TxtFileMemo.SelStart;
TextSelLength := Length(MainF.TxtFileMemo.Selection);
TextSelection := MainF.TxtFileMemo.Selection;
ApplyZapis;
end;
end
else begin
If TextSelected = true then begin
TextSelected := false;
ApplyZapis;
end;
end;
end;
end;

Вызывается это у меня OnMouseMove и OnKeyUp для Mamo.

Но Selection почемуто - всегда получается только первый символ из выделения... тоесть немогу получить длину выделенного текста :(...

Как мне ее узнать?


 
Спрашивающий_   (2003-11-05 04:35) [1]

procedure TForm1.Button2Click(Sender: TObject);
begin
Text:=IntToStr(Length(Memo1.SelText));
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.042 c
3-41034
Дмитрий К.
2003-10-15 11:28
2003.11.13
Отображение хода выполнения запроса


1-41691
Alexander Karpinskyy
2003-11-03 23:27
2003.11.13
Key Press


1-41708
slivka
2003-11-02 14:10
2003.11.13
Как добавить параметр типа REG_MULTI_SZ в реестр ?


6-41806
Vinter
2003-09-16 08:51
2003.11.13
TidTCPClient и TidTCPServer


14-42017
R
2003-10-17 02:43
2003.11.13
StringGrid с цветом




   Наверх