ChemText: Show aligned sub/superscripts in chemdemo project.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7978 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-03-12 21:31:58 +00:00
parent 44b49b960a
commit 3646a8dd75
2 changed files with 118 additions and 45 deletions

View File

@ -1,25 +1,34 @@
object Form1: TForm1
Left = 200
Height = 280
Height = 320
Top = 108
Width = 399
Width = 365
Caption = 'ChemLabel Demo'
ClientHeight = 280
ClientWidth = 399
ClientHeight = 320
ClientWidth = 365
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Arial'
Position = poScreenCenter
LCLVersion = '1.9.0.0'
LCLVersion = '2.1.0.0'
object Panel1: TPanel
Left = 16
Height = 137
Top = 8
Width = 361
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 12
Height = 178
Top = 12
Width = 341
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Left = 12
BorderSpacing.Top = 12
BorderSpacing.Right = 12
BevelOuter = bvNone
BorderStyle = bsSingle
ClientHeight = 133
ClientWidth = 357
ClientHeight = 174
ClientWidth = 337
Color = clWhite
Font.Color = clWindowText
Font.Height = -16
@ -30,20 +39,22 @@ object Form1: TForm1
object ChemLabel1: TChemLabel
AnchorSideLeft.Control = Spacer
AnchorSideLeft.Side = asrBottom
Left = 187
Height = 23
Top = 40
Width = 60
AnchorSideTop.Control = Label1
Left = 177
Height = 22
Top = 50
Width = 58
Caption = 'C3H7OH'
ParentColor = False
end
object ChemLabel2: TChemLabel
AnchorSideLeft.Control = Spacer
AnchorSideLeft.Side = asrBottom
Left = 187
Height = 23
Top = 68
Width = 121
AnchorSideTop.Control = Label2
Left = 177
Height = 22
Top = 80
Width = 118
Arrow = caUTF8Single
Caption = '2H2 + O2 -> H2O'
ParentColor = False
@ -51,13 +62,15 @@ object Form1: TForm1
object ChemLabel3: TChemLabel
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
Left = 110
Height = 19
Top = 8
Width = 136
AnchorSideTop.Control = Panel1
Left = 87
Height = 22
Top = 12
Width = 163
BorderSpacing.Top = 12
Caption = 'Using ChemLabel'
Font.Color = clNavy
Font.Height = -16
Font.Height = -19
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentColor = False
@ -66,10 +79,11 @@ object Form1: TForm1
object ChemLabel5: TChemLabel
AnchorSideLeft.Control = Spacer
AnchorSideLeft.Side = asrBottom
Left = 187
Height = 23
Top = 96
Width = 141
AnchorSideTop.Control = Label3
Left = 177
Height = 22
Top = 110
Width = 136
Arrow = caUTF8Single
Caption = 'H2+ + H2 --> H3+ + H'
ParentColor = False
@ -77,58 +91,111 @@ object Form1: TForm1
object Spacer: TBevel
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
Left = 170
Left = 160
Height = 136
Top = 0
Width = 17
Shape = bsSpacer
end
object Label3: TChemLabel
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Spacer
Left = 16
Left = 9
Height = 18
Top = 96
Width = 154
Top = 110
Width = 151
Anchors = [akTop, akRight]
BorderSpacing.Left = 12
BorderSpacing.Top = 12
Caption = 'Ion\-molecule reaction:'
ParentColor = False
end
object Label2: TChemLabel
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Spacer
Left = 40
Left = 30
Height = 18
Top = 68
Top = 80
Width = 130
Anchors = [akTop, akRight]
BorderSpacing.Top = 12
Caption = 'Chemical reaction:'
ParentColor = False
end
object Label1: TChemLabel
AnchorSideTop.Control = ChemLabel3
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Spacer
Left = 103
Left = 93
Height = 18
Top = 40
Top = 50
Width = 67
Anchors = [akTop, akRight]
BorderSpacing.Top = 16
Caption = 'Propanol:'
ParentColor = False
end
object ChemLabel6: TChemLabel
AnchorSideLeft.Control = Spacer
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label5
AnchorSideTop.Side = asrCenter
Left = 177
Height = 22
Top = 138
Width = 146
Arrow = caUTF8Single
BorderSpacing.Right = 12
Caption = '@^6|_3Li + @^2|_1H --> @^4|_2He + @^4|_2He'
ParentColor = False
end
object Label5: TChemLabel
AnchorSideTop.Control = Label3
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Spacer
Left = 43
Height = 18
Top = 140
Width = 117
Anchors = [akTop, akRight]
BorderSpacing.Top = 12
BorderSpacing.Bottom = 16
Caption = 'Nuclear reaction:'
ParentColor = False
end
end
object Edit1: TEdit
Left = 32
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Label4
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 12
Height = 26
Top = 184
Width = 329
Top = 228
Width = 341
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
OnChange = Edit1Change
TabOrder = 0
Text = '(CH3)3COH'
end
object ChemLabel4: TChemLabel
Left = 32
Height = 36
Top = 224
Width = 131
AnchorSideLeft.Control = Label4
AnchorSideTop.Control = Edit1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 12
Height = 34
Top = 270
Width = 341
Arrow = caUTF8Single
Alignment = taCenter
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 16
Caption = '(CH3)3COH'
Font.Color = clWindowText
Font.Height = -27
@ -137,10 +204,14 @@ object Form1: TForm1
ParentFont = False
end
object Label4: TLabel
Left = 32
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrBottom
Left = 12
Height = 18
Top = 162
Top = 206
Width = 140
BorderSpacing.Top = 16
Caption = 'Type a formula here:'
ParentColor = False
end

View File

@ -11,10 +11,12 @@ type
{ TForm1 }
TForm1 = class(TForm)
ChemLabel6: TChemLabel;
Label1: TChemLabel;
Label2: TChemLabel;
Label3: TChemLabel;
Label4: TLabel;
Label5: TChemLabel;
Spacer: TBevel;
ChemLabel1: TChemLabel;
ChemLabel2: TChemLabel;