summaryrefslogtreecommitdiff
path: root/src/frm_main.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-08 13:40:03 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-08 13:40:03 +0200
commit2393df75a17fa33821c917947056f46617566432 (patch)
treeafaea1ef44aa601504a0a514d722a47517b70fa9 /src/frm_main.pas
parentede5956d705d3a5c213870e8e0aebb0468f4b0c2 (diff)
downloadfpGUI-2393df75a17fa33821c917947056f46617566432.tar.xz
Initial import of ported RichTextView component.
Diffstat (limited to 'src/frm_main.pas')
-rw-r--r--src/frm_main.pas19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/frm_main.pas b/src/frm_main.pas
index 1563569f..84a3855a 100644
--- a/src/frm_main.pas
+++ b/src/frm_main.pas
@@ -8,7 +8,7 @@ uses
SysUtils, Classes, fpg_base, fpg_main, fpg_form, fpg_panel, fpg_tab,
fpg_tree, fpg_splitter, fpg_menu, fpg_memo, fpg_button, fpg_listbox,
fpg_label, fpg_edit, fpg_radiobutton, fpg_progressbar,
- HelpFile;
+ HelpFile, RichTextView;
type
@@ -25,7 +25,7 @@ type
tsHistory: TfpgTabSheet;
tvContents: TfpgTreeView;
Splitter1: TfpgSplitter;
- Memo1: TfpgMemo;
+ Memo1: TRichTextView;
MainMenu: TfpgMenuBar;
miFile: TfpgPopupMenu;
miSettings: TfpgPopupMenu;
@@ -177,6 +177,7 @@ var
f: THelpFile;
i: integer;
begin
+{
Memo1.Lines.Clear;
Memo1.Lines.BeginUpdate;
f := THelpFile(Files[0]);
@@ -194,6 +195,7 @@ begin
Add('[' + IntToStr(i) + '] = <' + f.DictionaryWords[i] + '>');
end;
Memo1.Lines.EndUpdate;
+}
end;
procedure TMainForm.btnShowIndex(Sender: TObject);
@@ -476,7 +478,8 @@ begin
tvContents.Selection := nil;
tvContents.RootNode.Clear;
tvContents.Invalidate;
- Memo1.Lines.Clear;
+ Memo1.Clear;
+// Memo1.Lines.Clear;
// First save notes. It's important we do this first
// since we scan all notes each time to find the ones
@@ -650,7 +653,8 @@ Begin
end;
end;
- Memo1.Lines.Clear;
+// Memo1.Clear;
+// Memo1.Lines.Clear;
ImageIndices := TList.Create;
ProfileEvent('Cleared memo...');
@@ -672,7 +676,8 @@ Begin
{ TODO -oGraeme : We do not support images yet }
ImageIndices.Free;
- Memo1.Lines.Text := lText;
+ Memo1.AddText(PChar(lText));
+// Memo1.Lines.Text := lText;
end;
procedure TMainForm.ResetProgress;
@@ -818,12 +823,12 @@ begin
Align := alLeft;
end;
- Memo1 := TfpgMemo.Create(bvlBody);
+ Memo1 := TRichTextView.Create(bvlBody);
with Memo1 do
begin
Name := 'Memo1';
SetPosition(276, 36, 244, 232);
- FontDesc := '#Edit1';
+// FontDesc := '#Edit1';
TabOrder := 2;
Align := alClient;
end;