Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.03.12;
Скачать: CL | DM;

Вниз

Пример добавления строк с различным форматированием в RichEdit...   Найти похожие ветки 

 
Stals ©   (2005-03-28 03:18) [0]

Сабж...
Задолбался искать... :(


 
thaddy   (2005-03-28 09:36) [1]

Here's a quick example:
______________________________
program ProjectRE;
uses
 Kol,
 UnitRE1 in 'UnitRE1.pas';
begin
 NewForm1( Form1, nil);
 Run(Form1.form);
end.
_______________________________

unit UnitRE1;
interface
uses
 Windows, Messages, Kol;

type

PForm1=^TForm1;
TForm1=object(Tobj)
 Form:pControl;
 Edit:Pcontrol;
 Menu:Pmenu;
public
 procedure doMenu(sender:PMenu;index:integer);
end;

procedure NewForm1( var Result: PForm1; AParent: PControl );

var
 Form1:pForm1;

implementation

procedure NewForm1( var Result: PForm1; AParent: PControl );
begin
 New(Result,Create);
 with Result^ do
 begin
   Form:= NewForm(AParent,'KOLForm').SetSize(600,400).centeronparent.Tabulate;
   Applet:=Form;
   Form.Add2AutoFree(Result);
   Form.font.releasehandle;
   form.font.assignhandle(getstockobject(DEFAULT_GUI_FONT));
   Form.SimpleStatusText:='New document';
   Menu:=NewMenu(form,0,['&File','(','&New','-','&Open','&Save','-' ,'E&xit',')','&Font','(','&Bold','&Italic','&Underline','-&# 39;,'&Color','-', '&Size',')'],Domenu);
   Edit:=NewRichEdit(form,[eoMultiline]).SetAlign(caClient);
 end;
end;

procedure TForm1.doMenu(sender: PMenu; index: integer);
var s:TFontstyle;
begin
case index of
1 :edit.clear;
3 :with newopensavedialog('','',[])^ do
  try
    Filter:='Rich text files|*.rtf';
    if execute then
      edit.re_loadfromfile(filename,reRtf,false);
  finally
    free;
  end;
8 :Edit.RE_FmtBold:=not edit.re_fmtBold;
9 :Edit.RE_FmtItalic:=not edit.re_fmtItalic;
10:Edit.RE_FmtUnderline:=not edit.re_fmtUnderline;
12:Edit.RE_Font.Color:=Random($FFFFFF);
14:Edit.RE_Font.Fontheight:=(8+Random(36))*20;//20 = printer points
else
  msgOk(int2str(index));
end;
end;

end.


 
Stals ©   (2005-03-30 02:15) [2]

Thanks, thaddy!
It is necessary to make illumination of syntax,
But could not find the necessary properties...:)
Yesterday has established yours KOLAPPEXPERT200...:)


 
thaddy   (2005-03-30 06:34) [3]

try out my example at:
http://members.chello.nl/t.koning8/koltomdemo.zip

Contains syntax highlighting using TOM Richedit.


 
Barloggg   (2005-07-18 13:49) [4]

mmm...
Почему я не могу установить одновременно два expertа? Если ставлю KOLAPPEXPERT200 для быстрого создания KOL приложение, то не могу поставить аналогичный эксперт для создания KOL+MCK приложения и наоборот.
И вообще не мешала бы инструкция как этими экспертами пользоваться, а то пришлось мозгой шевелить :)
Я устанавливал их оба в один и тот же модуль ибо выбора не прелагалось.


 
ECM ©   (2005-07-18 16:57) [5]

а то пришлось мозгой шевелить :)
...Это радует...:)


 
Barloggg   (2005-07-19 09:19) [6]

а меня радует что кого-то радует...
и все таки, как установить их обоих?


 
Thaddy   (2005-07-19 11:45) [7]

Change the identifiers in the code of one of them..
And rename. I have both installed( to ECM: Yes, I now sometimes use the MCK ;) )


 
Thaddy   (2005-07-19 11:46) [8]

Change the identifiers in the code of one of them..
And rename. I have both installed( to ECM: Yes, I now sometimes use the MCK ;) )



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

Текущий архив: 2006.03.12;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.035 c
15-1140180100
Ajax
2006-02-17 15:41
2006.03.12
Работа с базами электронных словарей


1-1134166900
Destroyer
2005-12-10 01:21
2006.03.12
Удаление без восстановления


15-1139950401
AlterEgo of WondeRu
2006-02-14 23:53
2006.03.12
А в вашем регионе GPRS от Beeline работает?


15-1140189040
Nick Denry
2006-02-17 18:10
2006.03.12
Тем, кто смотрит новости.


15-1140453655
Михаил (Киров)
2006-02-20 19:40
2006.03.12
COM-порт