Вниз
Скачать: 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.026 c
11-41127
Kladov
2003-02-18 16:51
2003.11.13
Про глюки тулбара.


1-41311
Ната
2003-10-31 09:27
2003.11.13
Текущая дата


14-42014
undert
2003-10-14 01:35
2003.11.13
Что делать ?


3-40930
Chaked
2003-10-17 17:23
2003.11.13
Отчеты


14-42074
andre
2003-10-22 18:31
2003.11.13
GLScene




   Наверх