Вниз
Скачать: 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
1-41507
Alex Shulg
2003-10-28 14:15
2003.11.13
OnDblClick и координаты мыши


14-41936
????
2003-10-20 20:55
2003.11.13
loCaseInsensitive


1-41636
atmospheric
2003-10-25 16:58
2003.11.13
Ключи


1-41344
vitalik
2003-10-30 20:21
2003.11.13
невидимая программа


1-41521
maestro
2003-10-28 07:55
2003.11.13
уничтожение компонента Button




   Наверх