Показать сообщение отдельно
  #5  
Старый 20.07.2021, 18:21
lmikle lmikle вне форума
Модератор
 
Регистрация: 17.04.2008
Сообщения: 7,993
Версия Delphi: 7, XE3, 10.2
Репутация: 49089
По умолчанию

Не ставить компоненты, связанные с данными. У тебя бесплатная версия Starter?

ЗЫ. Вообще-то я привел ссылку, где есть пример. Там в тексте один из разработчиков говорит, что их RichEdit это, как и большинство остальных, всего-лишь обертка для виндового контрола, т.е. должно работать в любом. Хотя там есть некоторая разница - надо смотреть какую версию виндового контрола использует конкретная библиотека. Вроде, начиная с W7, появилась версия 2.0. Стандартный контрол TRichEdit все еще опирается на 1.0 (вроде), но есть версии, которые уже работают с версией 2.0.

ЗЗЫ. Вот еще с другого форума:
Цитата:
you should be able to set sub/superscripts by sending an EM_SETCHARFORMAT
message to a TRichedit. Something like this:
Var
format: TCharFormat; { defined in Unit RichEdit }
FillChar( format, sizeof(format), 0);
With format Do Begin
cbSize:= Sizeof(format);
dwMask:= CFM_OFFSET;
yOffset:= 60;
{ superscript by 60 twips, negative values give subscripts}
End;
richedit1.Perform( EM_SETCHARFORMAT, SCF_SELECTION,
LongInt(@format));
The message affects the current selection. EM_GETCHARFORMAT can be used to
get the style set of the current selection into a TCharformat variable. You
check for sub/superscript by first testing
If (format.dwMask and CFM_OFFSET) <> 0 Then
...check format.yoffset for sign of offset
Note that richedit mark 1 (the version wrapped by Delphi's TRichedit) does
not automatically adjust the line spacing if you offset characters from the
baseline, and there is no way to change the line spacing from code. I don't
know if the newer richedit version 2.0 (there are wrappers on the Delphi
Super page, i think) handles this any better.
Тебе надо делать EM_GETCHARFORMAT и проверять что тебе напихали в соовт. структуру.
Ответить с цитированием