Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
55c68559
Commit
55c68559
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Created Font menu option to change font used for memo.
parent
6791ca9c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/ctrl/TextFileEditUnit.cpp
+18
-0
18 additions, 0 deletions
src/sbbs3/ctrl/TextFileEditUnit.cpp
src/sbbs3/ctrl/TextFileEditUnit.dfm
+37
-17
37 additions, 17 deletions
src/sbbs3/ctrl/TextFileEditUnit.dfm
src/sbbs3/ctrl/TextFileEditUnit.h
+5
-0
5 additions, 0 deletions
src/sbbs3/ctrl/TextFileEditUnit.h
with
60 additions
and
17 deletions
src/sbbs3/ctrl/TextFileEditUnit.cpp
+
18
−
0
View file @
55c68559
...
...
@@ -237,3 +237,21 @@ void __fastcall TTextFileEditForm::UndoExecute(TObject *Sender)
}
//---------------------------------------------------------------------------
void
__fastcall
TTextFileEditForm
::
ChangeFontExecute
(
TObject
*
Sender
)
{
FontDialog
->
Font
->
Assign
(
Memo
->
Font
);
FontDialog
->
Execute
();
Memo
->
Font
->
Assign
(
FontDialog
->
Font
);
}
//---------------------------------------------------------------------------
void
__fastcall
TTextFileEditForm
::
FontDialogApply
(
TObject
*
Sender
,
HWND
Wnd
)
{
Memo
->
Font
->
Assign
(
FontDialog
->
Font
);
}
//---------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/TextFileEditUnit.dfm
+
37
−
17
View file @
55c68559
object TextFileEditForm: TTextFileEditForm
Left =
329
Top =
2
36
Left =
476
Top = 36
7
Width = 783
Height = 540
Caption = 'TextFileEditForm'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -1
0
Font.Height = -1
3
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
...
...
@@ -39,21 +39,21 @@ object TextFileEditForm: TTextFileEditForm
OldCreateOrder = False
Position = poDefaultPosOnly
OnShow = FormShow
PixelsPerInch =
96
TextHeight = 1
3
PixelsPerInch =
120
TextHeight = 1
6
object Panel: TPanel
Left = 0
Top = 0
Width = 775
Height =
27
Height =
33
Align = alTop
BevelOuter = bvNone
TabOrder = 0
object OkButton: TBitBtn
Left =
8
Top =
3
Width =
73
Height = 2
1
Left =
10
Top =
4
Width =
90
Height = 2
6
Action = Save
Caption = 'OK'
ModalResult = 1
...
...
@@ -74,10 +74,10 @@ object TextFileEditForm: TTextFileEditForm
NumGlyphs = 2
end
object CancelButton: TBitBtn
Left =
8
5
Top =
3
Width =
73
Height = 2
1
Left =
10
5
Top =
4
Width =
89
Height = 2
6
Caption = 'Discard'
ModalResult = 2
TabOrder = 1
...
...
@@ -99,13 +99,13 @@ object TextFileEditForm: TTextFileEditForm
end
object Memo: TRichEdit
Left = 0
Top =
27
Top =
33
Width = 775
Height = 4
67
Height = 4
51
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -1
1
Font.Height = -1
5
Font.Name = 'Courier'
Font.Style = []
HideSelection = False
...
...
@@ -178,6 +178,9 @@ object TextFileEditForm: TTextFileEditForm
Action = InsertCtrlA
end
end
object FontMenuItem: TMenuItem
Action = ChangeFont
end
end
object PopupMenu: TPopupMenu
Left = 184
...
...
@@ -257,5 +260,22 @@ object TextFileEditForm: TTextFileEditForm
ShortCut = 16474
OnExecute = UndoExecute
end
object ChangeFont: TAction
Caption = 'Font'
OnExecute = ChangeFontExecute
end
end
object FontDialog: TFontDialog
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
MinFontSize = 0
MaxFontSize = 0
Options = [fdApplyButton]
OnApply = FontDialogApply
Left = 144
Top = 80
end
end
This diff is collapsed.
Click to expand it.
src/sbbs3/ctrl/TextFileEditUnit.h
+
5
−
0
View file @
55c68559
...
...
@@ -93,6 +93,9 @@ __published: // IDE-managed Components
TMenuItem
*
CutPopupMenuItem
;
TMenuItem
*
CopyPopupMenuItem
;
TMenuItem
*
PastePopupMenuItem
;
TFontDialog
*
FontDialog
;
TMenuItem
*
FontMenuItem
;
TAction
*
ChangeFont
;
void
__fastcall
FormShow
(
TObject
*
Sender
);
void
__fastcall
FontButtonClick
(
TObject
*
Sender
);
void
__fastcall
FindDialogFind
(
TObject
*
Sender
);
...
...
@@ -107,6 +110,8 @@ __published: // IDE-managed Components
void
__fastcall
CopyExecute
(
TObject
*
Sender
);
void
__fastcall
PasteExecute
(
TObject
*
Sender
);
void
__fastcall
UndoExecute
(
TObject
*
Sender
);
void
__fastcall
ChangeFontExecute
(
TObject
*
Sender
);
void
__fastcall
FontDialogApply
(
TObject
*
Sender
,
HWND
Wnd
);
private:
// User declarations
public:
// User declarations
__fastcall
TTextFileEditForm
(
TComponent
*
Owner
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment