-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkn_Defaults.pas
712 lines (608 loc) · 19.6 KB
/
kn_Defaults.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
(* ************************************************************
KEYNOTE: MOZILLA PUBLIC LICENSE STATEMENT.
-----------------------------------------------------------
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is KeyNote 1.0.
The Initial Developer of the Original Code is Marek Jedlinski
<eristic@lodz.pdi.net> (Poland).
Portions created by Marek Jedlinski are
Copyright (C) 2000, 2001. All Rights Reserved.
-----------------------------------------------------------
Contributor(s):
-----------------------------------------------------------
History:
-----------------------------------------------------------
Released: 30 June 2001
-----------------------------------------------------------
URLs:
- for OpenSource development:
http://keynote.sourceforge.net
- original author's software site:
http://www.lodz.pdi.net/~eristic/free/index.html
http://go.to/generalfrenetics
Email addresses (at least one should be valid)
<eristic@lodz.pdi.net>
<cicho@polbox.com>
<cicho@tenbit.pl>
************************************************************ *)
unit kn_Defaults;
interface
uses
Windows, Messages, SysUtils,
Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls,
gf_misc, kn_Const, kn_Info,
kn_Chest, Spin, Buttons,
ExtCtrls, ComCtrls95,
kn_NoteObj, gf_strings,
gf_Const, kn_Ini,
cmpGFXComboBox, Placemnt,
Menus, gf_LangCombo, LCCombo, TntStdCtrls;
type
TForm_Defaults = class(TForm)
Button_OK: TTntButton;
Button_Cancel: TTntButton;
ColorDlg: TColorDialog;
FontDlg: TFontDialog;
Pages: TPage95Control;
Tab_Main: TTab95Sheet;
Tab_Tree: TTab95Sheet;
GBox_Note: TTntGroupBox;
Label_TabSize: TTntLabel;
Label1: TTntLabel;
Bevel1: TBevel;
Label4: TTntLabel;
CB_WordWrap: TTntCheckBox;
CB_URLDetect: TTntCheckBox;
CB_UseTabChar: TTntCheckBox;
Spin_TabSize: TSpinEdit;
Edit_NoteName: TTntComboBox;
Combo_Icons: TGFXComboBox;
GBox_Tree: TTntGroupBox;
BTN_Font: TBitBtn;
BTN_Color: TBitBtn;
BTN_Defaults: TBitBtn;
Edit_Sample: TTntEdit;
Bevel2: TBevel;
CB_TreeCheck: TTntCheckBox;
Bevel4: TBevel;
Label5: TTntLabel;
Edit_NodeName: TTntComboBox;
CB_AutoNumberNodes: TTntCheckBox;
Bevel5: TBevel;
BitBtn_TknHlp: TBitBtn;
Label_EditorFonts: TTntLabel;
Label_TreeFonts: TTntLabel;
Label_TreeSettings: TTntLabel;
Label_EditorSettings: TTntLabel;
FormPlacement: TFormPlacement;
CB_Vertical: TTntCheckBox;
Tab_Adv: TTab95Sheet;
GroupBox1: TTntGroupBox;
CB_SaveAsDef: TTntCheckBox;
LB_SaveAsDef: TTntLabel;
Button_Help: TTntButton;
Label14: TTntLabel;
LB_PlainText: TTntLabel;
CB_PlainText: TTntCheckBox;
Label2: TTntLabel;
Combo_TreeImages: TTntComboBox;
Combo_DefEdLang: TLanguagesCombo;
CB_HideChecked: TTntCheckBox;
procedure FormCreate(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Button_OKClick(Sender: TObject);
procedure Button_CancelClick(Sender: TObject);
procedure BTN_FontClick(Sender: TObject);
procedure BTN_ColorClick(Sender: TObject);
procedure BTN_DefaultsClick(Sender: TObject);
procedure PagesChange(Sender: TObject);
procedure CB_UseTabCharClick(Sender: TObject);
procedure BitBtn_TknHlpClick(Sender: TObject);
procedure AM_SaveAsDefClick(Sender: TObject);
procedure Button_HelpClick(Sender: TObject);
procedure Edit_NoteNameKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
Initializing : boolean;
Action : TPropertiesAction;
OK_Click : boolean;
StartWithEditorTab : boolean;
NoteKind : TNoteType;
DefaultsFN : wideString;
myEditorChrome : TChrome;
myEditorProperties : TNoteEditorProperties;
myTabProperties : TNoteTabProperties;
myTreeChrome : TChrome;
myTreeProperties : TNoteTreeProperties;
myTabNameHistory : wideString;
myHistoryCnt : integer;
myNodeNameHistory : wideString;
mySaveFileDefaults : boolean;
myCurrentFileName : wideString;
myNoteIsReadOnly : boolean; // prevent changes
procedure FormToProps;
procedure PropsToForm;
procedure UpdateSampleFont;
end;
implementation
uses wideStrUtils;
{$R *.DFM}
resourcestring
STR_01 = 'Note Properties: %s';
STR_02 = 'Close';
STR_03 = 'Note is Read-Only: cannot change properties';
STR_04 = ' [RO]';
STR_05 = ' View properties for current note ';
STR_06 = ' Change properties for current note ';
STR_07 = '&Save as default for "%s"';
STR_08 = 'Defaults for ';
STR_09 = ' Defaults for notes in ';
STR_10 = 'Defaults for all files';
STR_11 = ' Change default properties for all new notes ';
STR_12 = 'Note name cannot be blank. Please enter a name.';
STR_13 = 'Note name cannot contain the "%s" character';
STR_14 = 'Node name cannot contain the "%s" character';
STR_15 = 'OK to reset Editor font and color settings to default values?';
STR_16 = 'OK to reset Tree font and color settings to default values?';
STR_17 = 'Tokens for autonaming tree nodes:';
STR_18 = '(must be UPPERCASE)';
STR_19 = ' = current date';
STR_20 = ' = current time';
STR_21 = ' = total number of nodes';
STR_22 = ' = new node''s level';
STR_23 = ' = new node''s index';
STR_24 = ' = new node''s absolute index';
STR_25 = ' = parent node''s name';
STR_26 = ' = name of active note';
STR_27 = ' = name of currently open file';
STR_28 = '<no icon>';
procedure TForm_Defaults.FormCreate(Sender: TObject);
var
i : integer;
nodeicn : TNodeIconKind;
begin
Initializing := true;
Pages.Visible := false; // to avoid flicker
Pages.TabInactiveColor := _GF_CLWINDOW;
myNoteIsReadOnly := false;
mySaveFileDefaults := false;
myCurrentFileName := '';
with FormPlacement do
begin
UseRegistry := _FORMPOS_USE_REGISTRY;
IniFileName := _FORMPOS_INIFILENAME;
end;
OK_Click := false;
Action := low( TPropertiesAction );
StartWithEditorTab := true;
NoteKind := ntRTF;
DefaultsFN := normalFN( changefileext( Application.ExeName, ext_DEFAULTS ));
myTabNameHistory := '';
myHistoryCnt := DEFAULT_HISTORY_COUNT;
InitializeChrome( myEditorChrome );
InitializeNoteEditorProperties( myEditorProperties );
InitializeNoteTabProperties( myTabProperties );
myNodeNameHistory := '';
InitializeChrome( myTreeChrome );
InitializeNoteTreeProperties( myTreeProperties );
Edit_NoteName.MaxLength := TABNOTE_NAME_LENGTH;
Edit_NodeName.MaxLength := TREENODE_NAME_LENGTH;
for nodeicn := low( nodeicn ) to high( nodeicn ) do
Combo_TreeImages.Items.Add( NODE_ICON_KINDS[nodeicn] );
Combo_TreeImages.ItemIndex := 1;
Combo_Icons.ImageList := Chest.IMG_Categories;
Combo_Icons.AddItem( STR_28, -1 );
for i := 0 to pred( Chest.IMG_Categories.Count ) do
Combo_Icons.AddItem( ' - ' + inttostr( succ( i )), i );
Combo_Icons.ItemIndex := 0;
end; // CREATE
procedure TForm_Defaults.FormActivate(Sender: TObject);
begin
if ( not Initializing ) then exit;
Initializing := false;
try
case Action of
propThisNote : begin
// Tab_Adv.TabVisible := false;
LB_SaveAsDef.Enabled := false;
CB_SaveAsDef.Enabled := false;
LB_PlainText.Enabled := true;
CB_PlainText.Enabled := true;
Caption := Format( STR_01, [RemoveAccelChar( myTabProperties.Name )] );
if myNoteIsReadOnly then
begin
Button_OK.ModalResult := mrCancel;
Button_OK.Caption := STR_02;
Button_OK.Hint := STR_03;
Button_Cancel.Visible := false;
Caption := Caption + STR_04;
GBox_Note.Caption := STR_05;
end
else
begin
GBox_Note.Caption := STR_06;
end;
end;
propDefaults : begin
LB_PlainText.Enabled := false;
CB_PlainText.Enabled := false;
if ( myCurrentFileName <> '' ) then
begin
CB_SaveAsDef.Caption := WideFormat( STR_07, [myCurrentFileName] );
// Tab_Adv.TabVisible := true;
LB_SaveAsDef.Enabled := true;
CB_SaveAsDef.Enabled := true;
end
else
begin
// Tab_Adv.TabVisible := false;
LB_SaveAsDef.Enabled := false;
CB_SaveAsDef.Enabled := false;
end;
if ( CB_SaveAsDef.Enabled and mySaveFileDefaults ) then
begin
CB_SaveAsDef.Checked := true;
Caption := STR_08 + myCurrentFileName;
GBox_Note.Caption := STR_09 + myCurrentFileName + ' ';
end
else
begin
Caption := STR_10;
GBox_Note.Caption := STR_11;
end;
end;
end;
Edit_NoteName.Items.BeginUpdate;
try
DelimTextToWStrs( Edit_NoteName.Items, myTabNameHistory, HISTORY_SEPARATOR );
finally
Edit_NoteName.Items.EndUpdate;
end;
GBox_Tree.Caption := GBox_Note.Caption;
BitBtn_TknHlp.OnClick := BitBtn_TknHlpClick;
Tab_Tree.TabVisible := (( Action in [propDefaults] ) or ( NoteKind = ntTree ));
Edit_NodeName.Items.BeginUpdate;
try
DelimTextToWStrs( Edit_NodeName.Items, myNodeNameHistory, HISTORY_SEPARATOR );
finally
Edit_NodeName.Items.EndUpdate;
end;
if StartWithEditorTab then
Pages.ActivePage := Tab_Main
else
Pages.ActivePage := Tab_Tree;
PropsToForm;
UpdateSampleFont;
finally
Pages.OnChange := PagesChange;
Pages.Visible := true;
end;
try
if ( Pages.ActivePage = Tab_Main ) then
begin
Edit_NoteName.SetFocus;
Edit_NoteName.SelectAll;
end
else
begin
Edit_NodeName.SetFocus;
Edit_NodeName.SelectAll;
end;
except
end;
end; // ACTIVATE
procedure TForm_Defaults.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
var
i : integer;
begin
if OK_Click then
begin
OK_Click := false;
if ( Edit_NoteName.Text = '' ) then
begin
CanClose := false;
messagedlg( STR_12, mtError, [mbOK], 0 );
Pages.ActivePage := Tab_Main;
Edit_NoteName.SetFocus;
exit;
end;
if ( pos( KNTLINK_SEPARATOR, Edit_NoteName.Text ) > 0 ) then
begin
CanClose := false;
messagedlg( Format(
STR_13,
[KNTLINK_SEPARATOR]
), mtError, [mbOK], 0 );
Pages.ActivePage := Tab_Main;
Edit_NoteName.SetFocus;
exit;
end;
if ( pos( KNTLINK_SEPARATOR, Edit_NodeName.Text ) > 0 ) then
begin
CanClose := false;
messagedlg( Format(
STR_14,
[KNTLINK_SEPARATOR]
), mtError, [mbOK], 0 );
Pages.ActivePage := Tab_Tree;
Edit_NodeName.SetFocus;
exit;
end;
myTabNameHistory := WideQuotedStr( Edit_NoteName.Text, '"' );
for i := 0 to pred( Edit_NoteName.Items.Count ) do
begin
if ( i >= myHistoryCnt ) then break;
if (( Edit_NoteName.Items[i] <> Edit_NoteName.Text ) and ( Edit_NoteName.Items[i] <> '' )) then
myTabNameHistory := myTabNameHistory + HISTORY_SEPARATOR + WideQuotedStr( Edit_NoteName.Items[i], '"' );
end;
if ( Edit_NodeName.Text <> '' ) then
myNodeNameHistory := WideQuotedStr( Edit_NodeName.Text, '"' )
else
myNodeNameHistory := '';
for i := 0 to pred( Edit_NodeName.Items.Count ) do
begin
if ( i >= myHistoryCnt ) then break;
if (( Edit_NodeName.Items[i] <> Edit_NodeName.Text ) and ( Edit_NodeName.Items[i] <> '' )) then
myNodeNameHistory := myNodeNameHistory + HISTORY_SEPARATOR + WideQuotedStr( Edit_NodeName.Items[i], '"' );
end;
FormToProps;
end;
OK_Click := false;
end; // CLOSEQUERY
procedure TForm_Defaults.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case key of
27 : if (( shift = [] ) and ( not
( Combo_Icons.DroppedDown or Edit_NoteName.DroppedDown or Edit_NodeName.DroppedDown ))) then
begin
key := 0;
OK_Click := false;
Close;
end;
end;
end; // KEY DOWN
procedure TForm_Defaults.Button_OKClick(Sender: TObject);
begin
OK_Click := true;
end;
procedure TForm_Defaults.Button_CancelClick(Sender: TObject);
begin
OK_Click := false;
end;
procedure TForm_Defaults.FormToProps;
begin
with myTabProperties do
begin
Name := trim( Edit_NoteName.Text );
ImageIndex := pred( Combo_Icons.ItemIndex );
end;
with myEditorProperties do
begin
TabSize := Spin_TabSize.Value;
PlainText := CB_PlainText.Checked;
URLDetect := CB_URLDetect.Checked;
UseTabChar := CB_UseTabChar.Checked;
WordWrap := CB_WordWrap.Checked;
end;
if (( Action in [propDefaults] ) or ( NoteKind = ntTree )) then
begin
with myTreeProperties do
begin
if ( trim( Edit_NodeName.Text ) <> '' ) then
DefaultName := trim( Edit_NodeName.Text );
IconKind := TNodeIconKind( Combo_TreeImages.ItemIndex );
Checkboxes := CB_TreeCheck.Checked;
VerticalLayout := CB_Vertical.Checked;
AutoNumberNodes := CB_AutoNumberNodes.Checked;
HideChecked:= CB_HideChecked.Checked;
end;
end;
with myEditorChrome do
begin
Language := Combo_DefEdLang.Language;
end;
end; // FormToProps
procedure TForm_Defaults.PropsToForm;
begin
with myTabProperties do
begin
Edit_NoteName.Text := Name;
Combo_Icons.ItemIndex := succ( ImageIndex );
end;
with myEditorProperties do
begin
Spin_TabSize.Value := TabSize;
CB_PlainText.Checked := PlainText;
CB_URLDetect.Checked := URLDetect;
CB_UseTabChar.Checked := UseTabChar;
CB_WordWrap.Checked := WordWrap;
end;
if (( Action in [propDefaults] ) or ( NoteKind = ntTree )) then
begin
with myTreeProperties do
begin
Edit_NodeName.Text := DefaultName;
Combo_TreeImages.ItemIndex := ord( IconKind );
CB_TreeCheck.Checked := Checkboxes;
CB_Vertical.Checked := VerticalLayout;
CB_AutoNumberNodes.Checked := AutoNumberNodes;
CB_HideChecked.Checked := HideChecked; // [dpv]
end;
end;
with myEditorChrome do
begin
Combo_DefEdLang.Language := Language;
end;
end; // PropsToForm
procedure TForm_Defaults.UpdateSampleFont;
begin
if Pages.ActivePage = Tab_Adv then
begin
BTN_Font.Visible := false;
BTN_Color.Visible := false;
BTN_Defaults.Visible := false;
Edit_Sample.Visible := false;
end
else
begin
BTN_Font.Visible := true;
BTN_Color.Visible := true;
BTN_Defaults.Visible := true;
Edit_Sample.Visible := true;
if Pages.ActivePage = Tab_Tree then
begin
Edit_Sample.Color := myTreeChrome.BGColor;
FontInfoToFont( myTreeChrome.Font, Edit_Sample.Font );
with myTreeChrome do
begin
Edit_Sample.Text := Font.Name + #32 + inttostr( Font.Size ) + ' pt ' + FontStyleToStr( Font.Style );
end;
end
else
begin
Edit_Sample.Color := myEditorChrome.BGColor;
FontInfoToFont( myEditorChrome.Font, Edit_Sample.Font );
with myEditorChrome do
begin
Edit_Sample.Text := Font.Name + #32 + inttostr( Font.Size ) + ' pt ' + FontStyleToStr( Font.Style );
end;
end;
end;
end; // UpdateSampleFont
procedure TForm_Defaults.BTN_FontClick(Sender: TObject);
begin
if ( Pages.ActivePage = Tab_Main ) then
begin
FontDlg.Options := FontDlg.Options + [fdEffects];
FontInfoToFont( myEditorChrome.Font, FontDlg.Font );
if FontDlg.Execute then
FontToFontInfo( FontDlg.Font, myEditorChrome.Font );
end
else
begin
if ( not _ALLOW_TREE_FONT_COLOR ) then
FontDlg.Options := FontDlg.Options - [fdEffects];
FontInfoToFont( myTreeChrome.Font, FontDlg.Font );
if FontDlg.Execute then
FontToFontInfo( FontDlg.Font, myTreeChrome.Font );
end;
UpdateSampleFont;
end;
procedure TForm_Defaults.BTN_ColorClick(Sender: TObject);
begin
if ( Pages.ActivePage = Tab_Main ) then
begin
ColorDlg.Color := myEditorChrome.BGColor;
if ColorDlg.Execute then
myEditorChrome.BGColor := ColorDlg.Color;
end
else
begin
ColorDlg.Color := myTreeChrome.BGColor;
if ColorDlg.Execute then
myTreeChrome.BGColor := ColorDlg.Color;
end;
UpdateSampleFont;
end;
procedure TForm_Defaults.BTN_DefaultsClick(Sender: TObject);
var
tmpChrome : TChrome;
ShiftWasDown : boolean;
begin
ShiftWasDown := ShiftDown;
if ( Pages.ActivePage = Tab_Main ) then
begin
if ( messagedlg( STR_15, mtConfirmation, [mbYes,mbNo], 0 ) <> mrYes ) then exit;
InitializeChrome( myEditorChrome );
// If editing properties for active note, restore defaults from
// keynote.def file rather than original factory defaults,
// unless SHIFT is pressed
if (( Action = propThisNote ) and ( not ShiftWasDown ) and fileexists( DefaultsFN )) then
begin
LoadKeyNoteDefaults(
true, // load ONLY chrome
DefaultsFN,
myEditorProperties,
myEditorChrome, // only THIS will get loaded from file
myTabProperties,
myTreeProperties,
tmpChrome
);
end;
end
else
begin
if ( messagedlg( STR_16, mtConfirmation, [mbYes,mbNo], 0 ) <> mrYes ) then exit;
InitializeChrome( myTreeChrome );
InitializeChrome( tmpChrome );
if (( Action = propThisNote ) and ( not ShiftWasDown ) and fileexists( DefaultsFN )) then
begin
LoadKeyNoteDefaults(
true, // load ONLY chrome
DefaultsFN,
myEditorProperties,
tmpChrome,
myTabProperties,
myTreeProperties,
myTreeChrome // only THIS will get loaded from file
);
end;
end;
UpdateSampleFont;
end;
procedure TForm_Defaults.PagesChange(Sender: TObject);
begin
UpdateSampleFont;
end;
procedure TForm_Defaults.BitBtn_TknHlpClick(Sender: TObject);
begin
messagedlg(
STR_17 +#13+
STR_18 +#13#13+
NODEINSDATE + STR_19 +#13+
NODEINSTIME + STR_20 +#13+
NODECOUNT + STR_21 +#13+
NODELEVEL + STR_22 +#13+
NODEINDEX + STR_23 +#13+
NODEABSINDEX + STR_24 +#13+
NODEPARENT + STR_25 +#13+
NODENOTENAME + STR_26 +#13+
NODEFILENAME + STR_27,
mtInformation, [mbOK], 0
);
end;
procedure TForm_Defaults.CB_UseTabCharClick(Sender: TObject);
begin
Label_TabSize.Enabled := ( not CB_UseTabChar.Checked );
Spin_TabSize.Enabled := Label_TabSize.Enabled;
end;
procedure TForm_Defaults.AM_SaveAsDefClick(Sender: TObject);
begin
mySaveFileDefaults := CB_SaveAsDef.Checked;
end;
procedure TForm_Defaults.Button_HelpClick(Sender: TObject);
begin
Application.HelpCommand( HELP_CONTEXT, Pages.ActivePage.HelpContext );
end;
procedure TForm_Defaults.Edit_NoteNameKeyPress(Sender: TObject;
var Key: Char);
begin
if ( Key = KNTLINK_SEPARATOR ) then
Key := #0;
end; // Edit_NoteNameKeyPress
end.