Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.10.31;
Скачать: [xml.tar.bz2];

Вниз

Как в RichEdit е в большом тексте вывести на экран нужный фрагмен   Найти похожие ветки 

 
sasha_delphi   (2002-10-21 14:18) [0]

Как в RichEdit"е в большом тексте вывести на экран нужный фрагмент?


 
Arcus   (2002-10-21 15:19) [1]

Вывести в смысле "выделить"? Тогда SelStart / SelLength


 
sasha_delphi   (2002-10-21 15:45) [2]

Не выделить, а показать на экране нужный фрагмент,
после заполнения RichEdit"а на экране последняя строка текста.
А надо вывести определенный абзац.


 
MegaBass   (2002-10-21 15:47) [3]

richedit1.paragraph


 
sasha_delphi   (2002-10-21 16:13) [4]

И что richedit1.paragraph


 
MegaBass   (2002-10-21 16:23) [5]

Searches a given range in the text for a target string.

type
TSearchType = (stWholeWord, stMatchCase);

TSearchTypes = set of TSearchType;

function FindText(const SearchStr: string; StartPos, Length: Integer; Options: TSearchTypes): Integer;

Description

Use FindText to search a range of text in a rich edit control for the string specified by the SearchStr parameter. Only the text in the range starting at the position StartPos and continuing through the next Length positions will be searched. Use Options to specify whether the search should match whole words only and whether the search should be case sensitive. FindText returns the position of the search string, where 0 is the position of the first character in the rich edit control (as opposed to the first position in the search range). If the search string does not appear in the indicated range, FindText returns -1.

Use FindText rather than programmatically searching through the text of the control, to keep from being thrown off by the encoding of rich text characteristics.
SelectStart, SelectLength


 
Arcus   (2002-10-21 16:32) [6]

посмотри также EM_LINESCROLL


 
sasha_delphi   (2002-10-21 18:27) [7]

где посмотреть EM_LINESCROLL, в Help"е не нашел.


 
sasha_delphi   (2002-10-21 18:39) [8]

Это все хорошо, и курсор в нужное место ставится, и выделяется
найденый фрагмент, но это все за экраном, не знаю как проскролировать RichEdit до нужного места.


 
Arcus   (2002-10-21 19:01) [9]

Win32 Help

An application sends an EM_LINESCROLL message to scroll the text vertically or horizontally in a multiline edit control.

EM_LINESCROLL
wParam = (WPARAM) cxScroll; // characters to scroll horizontally
lParam = (LPARAM) cyScroll; // lines to scroll vertically


Т.е. делаешь

SendMessage(REdit.Handle, EM_LINESCROLL, -REdit.CaretPos.X, -REdit.CaretPos.Y);



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

Форум: "Основная";
Текущий архив: 2002.10.31;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.46 MB
Время: 0.015 c
3-101060
MystiX
2002-10-12 15:30
2002.10.31
Передача данных


1-101264
Zergling
2002-10-21 10:08
2002.10.31
Не могу прочитать файл созданный TFileStream


3-101107
ValSam
2002-10-09 17:41
2002.10.31
Oracle ->MSSQL


14-101456
Txxx
2002-09-07 22:24
2002.10.31
Конкурс на лучшего дешифровальшика !!!


14-101497
msalex
2002-10-11 21:40
2002.10.31
Quake 3.





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский