mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 12:08:09 +02:00
added 2 as default gtk intf value for GetSystemMetric(sm_cxedge) and extended TSempahorGrid from Salvatore
git-svn-id: trunk@7839 -
This commit is contained in:
parent
66487f5d80
commit
b0f71e6cd3
@ -8,33 +8,31 @@
|
||||
<SaveOnlyProjectUnits Value="True"/>
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<Title Value="project1"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
</General>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<CursorPos X="44" Y="12"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<CursorPos X="25" Y="6"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<Loaded Value="True"/>
|
||||
<TopLine Value="1"/>
|
||||
<UnitName Value="project1"/>
|
||||
<UsageCount Value="41"/>
|
||||
<UsageCount Value="43"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<CursorPos X="1" Y="72"/>
|
||||
<CursorPos X="44" Y="138"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<Loaded Value="True"/>
|
||||
<ResourceFilename Value="Unit1.lrs"/>
|
||||
<TopLine Value="60"/>
|
||||
<TopLine Value="132"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<UsageCount Value="41"/>
|
||||
<UsageCount Value="43"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
<PublishOptions>
|
||||
|
@ -1,266 +1,141 @@
|
||||
object Form1: TForm1
|
||||
Caption = 'Try SemaphorGrid'
|
||||
ClientHeight = 299
|
||||
ClientWidth = 536
|
||||
ClientHeight = 416
|
||||
ClientWidth = 590
|
||||
OnCreate = Form1Create
|
||||
PixelsPerInch = 96
|
||||
HorzScrollBar.Page = 535
|
||||
VertScrollBar.Page = 298
|
||||
Left = 219
|
||||
Height = 299
|
||||
Top = 192
|
||||
Width = 536
|
||||
HorzScrollBar.Page = 589
|
||||
VertScrollBar.Page = 415
|
||||
Left = 183
|
||||
Height = 416
|
||||
Top = 115
|
||||
Width = 590
|
||||
object Button1: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Toggle Semaphor'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
TabOrder = 1
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 232
|
||||
Width = 112
|
||||
end
|
||||
object Button2: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Next Semafore Style'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 1
|
||||
TabOrder = 2
|
||||
Left = 128
|
||||
Height = 25
|
||||
Top = 232
|
||||
Width = 126
|
||||
end
|
||||
object Button3: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Next Alignment'
|
||||
OnClick = Button3Click
|
||||
TabOrder = 2
|
||||
TabOrder = 3
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 264
|
||||
Width = 114
|
||||
end
|
||||
object Button4: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Close'
|
||||
OnClick = Button4Click
|
||||
TabOrder = 3
|
||||
TabOrder = 4
|
||||
Left = 331
|
||||
Height = 25
|
||||
Top = 264
|
||||
Width = 75
|
||||
end
|
||||
object Button5: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Save to File'
|
||||
OnClick = Button5Click
|
||||
TabOrder = 4
|
||||
TabOrder = 5
|
||||
Left = 128
|
||||
Height = 25
|
||||
Top = 264
|
||||
Width = 88
|
||||
end
|
||||
object Button6: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Load from File'
|
||||
OnClick = Button6Click
|
||||
TabOrder = 5
|
||||
TabOrder = 6
|
||||
Left = 227
|
||||
Height = 25
|
||||
Top = 264
|
||||
Width = 96
|
||||
end
|
||||
object Button7: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'AutoWidth'
|
||||
OnClick = Button7Click
|
||||
TabOrder = 6
|
||||
TabOrder = 7
|
||||
Left = 264
|
||||
Height = 17
|
||||
Top = 232
|
||||
Width = 67
|
||||
end
|
||||
object Button8: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'AutoHeight'
|
||||
OnClick = Button8Click
|
||||
TabOrder = 7
|
||||
TabOrder = 8
|
||||
Left = 334
|
||||
Height = 17
|
||||
Top = 232
|
||||
Width = 72
|
||||
end
|
||||
object Button9: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Sort Cols[4]'
|
||||
OnClick = Button9Click
|
||||
TabOrder = 8
|
||||
TabOrder = 9
|
||||
Left = 176
|
||||
Height = 20
|
||||
Top = 167
|
||||
Width = 75
|
||||
end
|
||||
object RadioButton1: TRadioButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Ascending'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 9
|
||||
Left = 259
|
||||
Height = 23
|
||||
Top = 164
|
||||
Width = 92
|
||||
end
|
||||
object RadioButton2: TRadioButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Descending'
|
||||
TabOrder = 10
|
||||
Left = 259
|
||||
Height = 23
|
||||
Height = 13
|
||||
Top = 164
|
||||
Width = 69
|
||||
end
|
||||
object RadioButton2: TRadioButton
|
||||
Caption = 'Descending'
|
||||
TabOrder = 11
|
||||
Left = 259
|
||||
Height = 13
|
||||
Top = 185
|
||||
Width = 102
|
||||
Width = 76
|
||||
end
|
||||
object Button10: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Hide/Show Cols[1]'
|
||||
OnClick = Button10Click
|
||||
TabOrder = 11
|
||||
TabOrder = 12
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 164
|
||||
Width = 142
|
||||
end
|
||||
object Button11: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Clear'
|
||||
OnClick = Button11Click
|
||||
TabOrder = 12
|
||||
TabOrder = 13
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 196
|
||||
Width = 44
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'OnlyValue'
|
||||
TabOrder = 13
|
||||
Left = 60
|
||||
Height = 23
|
||||
Top = 196
|
||||
Width = 90
|
||||
end
|
||||
object Panel1: TPanel
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Panel1'
|
||||
ClientHeight = 154
|
||||
ClientWidth = 464
|
||||
FullRepaint = False
|
||||
TabOrder = 14
|
||||
Left = 8
|
||||
Height = 154
|
||||
Top = 8
|
||||
Width = 464
|
||||
object SemaphorGrid1: TSemaphorGrid
|
||||
Alignment = taCenter
|
||||
Semaphor = True
|
||||
StringRed = 'no'
|
||||
StringYellow = 'maybe'
|
||||
StringGreen = 'yes'
|
||||
SemaphorShape = ssDisk
|
||||
BorderSpacing.OnChange = nil
|
||||
Color = clWhite
|
||||
ColCount = 5
|
||||
DefaultRowHeight = 24
|
||||
FixedColor = clBtnFace
|
||||
GridLineWidth = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goSmoothScroll]
|
||||
RowCount = 5
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
VisibleColCount = 4
|
||||
VisibleRowCount = 4
|
||||
Height = 148
|
||||
Width = 456
|
||||
Cells = (
|
||||
24
|
||||
0
|
||||
0
|
||||
'a\n'
|
||||
0
|
||||
1
|
||||
'a'
|
||||
0
|
||||
2
|
||||
'b'
|
||||
0
|
||||
3
|
||||
'c'
|
||||
0
|
||||
4
|
||||
'd'
|
||||
1
|
||||
0
|
||||
'1'
|
||||
1
|
||||
1
|
||||
'no'
|
||||
1
|
||||
2
|
||||
'alpha'
|
||||
1
|
||||
3
|
||||
'zed'
|
||||
1
|
||||
4
|
||||
'maybe'
|
||||
2
|
||||
0
|
||||
'2'
|
||||
2
|
||||
1
|
||||
'yes'
|
||||
2
|
||||
2
|
||||
'Salvatore'
|
||||
2
|
||||
3
|
||||
'0.9877'
|
||||
2
|
||||
4
|
||||
'yes'
|
||||
3
|
||||
0
|
||||
'3'
|
||||
3
|
||||
2
|
||||
'no'
|
||||
3
|
||||
3
|
||||
'Coppola'
|
||||
3
|
||||
4
|
||||
'maybe'
|
||||
4
|
||||
0
|
||||
'4'
|
||||
4
|
||||
1
|
||||
'5'
|
||||
4
|
||||
2
|
||||
'12'
|
||||
4
|
||||
3
|
||||
'-1'
|
||||
4
|
||||
4
|
||||
'2'
|
||||
)
|
||||
end
|
||||
Left = 60
|
||||
Height = 13
|
||||
Top = 196
|
||||
Width = 67
|
||||
end
|
||||
object Button12: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Sort Cols[1]'
|
||||
OnClick = Button12Click
|
||||
TabOrder = 15
|
||||
@ -270,24 +145,187 @@ object Form1: TForm1
|
||||
Width = 75
|
||||
end
|
||||
object ToggleBox1: TToggleBox
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'UnEditable'
|
||||
OnClick = ToggleBox1Click
|
||||
TabOrder = 16
|
||||
Left = 384
|
||||
Height = 25
|
||||
Height = 13
|
||||
Top = 167
|
||||
Width = 90
|
||||
Width = 71
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Only Float'
|
||||
OnClick = CheckBox2Click
|
||||
TabOrder = 17
|
||||
Left = 384
|
||||
Height = 23
|
||||
Height = 13
|
||||
Top = 203
|
||||
Width = 89
|
||||
Width = 66
|
||||
end
|
||||
object Button13: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'AutoFit'
|
||||
OnClick = Button13Click
|
||||
TabOrder = 18
|
||||
Left = 408
|
||||
Height = 17
|
||||
Top = 232
|
||||
Width = 72
|
||||
end
|
||||
object SemaphorGrid1: TSemaphorGrid
|
||||
Constraints.MaxHeight = 160
|
||||
Constraints.MaxWidth = 350
|
||||
Alignment = taCenter
|
||||
Semaphor = True
|
||||
StringRed = 'no'
|
||||
StringYellow = 'maybe'
|
||||
StringGreen = 'yes'
|
||||
SemaphorShape = ssDisk
|
||||
BorderSpacing.OnChange = nil
|
||||
Color = clWhite
|
||||
ColCount = 5
|
||||
DefaultRowHeight = 24
|
||||
FixedColor = clBtnFace
|
||||
GridLineWidth = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goSmoothScroll]
|
||||
RowCount = 5
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
VisibleColCount = 4
|
||||
VisibleRowCount = 4
|
||||
Height = 152
|
||||
Width = 332
|
||||
Cells = (
|
||||
24
|
||||
0
|
||||
0
|
||||
'a\n'
|
||||
0
|
||||
1
|
||||
'a'
|
||||
0
|
||||
2
|
||||
'b'
|
||||
0
|
||||
3
|
||||
'c'
|
||||
0
|
||||
4
|
||||
'd'
|
||||
1
|
||||
0
|
||||
'1'
|
||||
1
|
||||
1
|
||||
'no'
|
||||
1
|
||||
2
|
||||
'alpha'
|
||||
1
|
||||
3
|
||||
'zed'
|
||||
1
|
||||
4
|
||||
'maybe'
|
||||
2
|
||||
0
|
||||
'2'
|
||||
2
|
||||
1
|
||||
'yes'
|
||||
2
|
||||
2
|
||||
'Semaphor'
|
||||
2
|
||||
3
|
||||
'0.9877'
|
||||
2
|
||||
4
|
||||
'yes'
|
||||
3
|
||||
0
|
||||
'3'
|
||||
3
|
||||
2
|
||||
'no'
|
||||
3
|
||||
3
|
||||
'Grid'
|
||||
3
|
||||
4
|
||||
'maybe'
|
||||
4
|
||||
0
|
||||
'4'
|
||||
4
|
||||
1
|
||||
'5'
|
||||
4
|
||||
2
|
||||
'12'
|
||||
4
|
||||
3
|
||||
'-1'
|
||||
4
|
||||
4
|
||||
'2'
|
||||
)
|
||||
end
|
||||
object SemaphorGrid2: TSemaphorGrid
|
||||
StringRed = 'no'
|
||||
StringYellow = 'maybe'
|
||||
StringGreen = 'yes'
|
||||
SemaphorShape = ssDisk
|
||||
ColCount = 5
|
||||
FixedColor = clBtnFace
|
||||
GridLineWidth = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goSmoothScroll]
|
||||
RowCount = 5
|
||||
ScrollBars = ssAutoBoth
|
||||
VisibleColCount = 2
|
||||
VisibleRowCount = 4
|
||||
Height = 100
|
||||
Top = 305
|
||||
Width = 200
|
||||
end
|
||||
object SemaphorGrid3: TSemaphorGrid
|
||||
Semaphor = True
|
||||
StringRed = 'no'
|
||||
StringYellow = 'maybe'
|
||||
StringGreen = 'yes'
|
||||
SemaphorShape = ssDisk
|
||||
ColCount = 5
|
||||
FixedColor = clBtnFace
|
||||
GridLineWidth = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goSmoothScroll]
|
||||
RowCount = 5
|
||||
ScrollBars = ssAutoBoth
|
||||
VisibleColCount = 2
|
||||
VisibleRowCount = 4
|
||||
Left = 320
|
||||
Height = 100
|
||||
Top = 304
|
||||
Width = 200
|
||||
end
|
||||
object Button14: TButton
|
||||
Caption = 'Assign'
|
||||
OnClick = Button14Click
|
||||
TabOrder = 19
|
||||
Left = 411
|
||||
Height = 25
|
||||
Top = 263
|
||||
Width = 75
|
||||
end
|
||||
object Button15: TButton
|
||||
BorderSpacing.OnChange = nil
|
||||
Caption = 'Show Content'
|
||||
OnClick = Button15Click
|
||||
TabOrder = 20
|
||||
Left = 491
|
||||
Height = 25
|
||||
Top = 263
|
||||
Width = 77
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
Title = 'Save file as'
|
||||
@ -301,6 +339,6 @@ object Form1: TForm1
|
||||
FilterIndex = 0
|
||||
Title = 'Open existing file'
|
||||
left = 8
|
||||
top = 376
|
||||
top = 352
|
||||
end
|
||||
end
|
||||
|
@ -2,70 +2,81 @@
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#7'Caption'#6#16'Try SemaphorGrid'#12'ClientHeight'#3
|
||||
+'+'#1#11'ClientWidth'#3#24#2#8'OnCreate'#7#11'Form1Create'#13'PixelsPerInch'
|
||||
+#2'`'#18'HorzScrollBar.Page'#3#23#2#18'VertScrollBar.Page'#3'*'#1#4'Left'#3
|
||||
+#219#0#6'Height'#3'+'#1#3'Top'#3#192#0#5'Width'#3#24#2#0#7'TButton'#7'Button'
|
||||
+'1'#22'BorderSpacing.OnChange'#13#7'Caption'#6#15'Toggle Semaphor'#7'OnClick'
|
||||
+#7#12'Button1Click'#8'TabOrder'#2#0#4'Left'#2#8#6'Height'#2#25#3'Top'#3#232#0
|
||||
+#5'Width'#2'p'#0#0#7'TButton'#7'Button2'#22'BorderSpacing.OnChange'#13#7'Cap'
|
||||
+'tion'#6#19'Next Semafore Style'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2
|
||||
+#1#4'Left'#3#128#0#6'Height'#2#25#3'Top'#3#232#0#5'Width'#2'~'#0#0#7'TButton'
|
||||
+#7'Button3'#22'BorderSpacing.OnChange'#13#7'Caption'#6#14'Next Alignment'#7
|
||||
+'OnClick'#7#12'Button3Click'#8'TabOrder'#2#2#4'Left'#2#8#6'Height'#2#25#3'To'
|
||||
+'p'#3#8#1#5'Width'#2'r'#0#0#7'TButton'#7'Button4'#22'BorderSpacing.OnChange'
|
||||
+#13#7'Caption'#6#5'Close'#7'OnClick'#7#12'Button4Click'#8'TabOrder'#2#3#4'Le'
|
||||
+'ft'#3'K'#1#6'Height'#2#25#3'Top'#3#8#1#5'Width'#2'K'#0#0#7'TButton'#7'Butto'
|
||||
+'n5'#22'BorderSpacing.OnChange'#13#7'Caption'#6#12'Save to File'#7'OnClick'#7
|
||||
+#12'Button5Click'#8'TabOrder'#2#4#4'Left'#3#128#0#6'Height'#2#25#3'Top'#3#8#1
|
||||
+#5'Width'#2'X'#0#0#7'TButton'#7'Button6'#22'BorderSpacing.OnChange'#13#7'Cap'
|
||||
+'tion'#6#14'Load from File'#7'OnClick'#7#12'Button6Click'#8'TabOrder'#2#5#4
|
||||
+'Left'#3#227#0#6'Height'#2#25#3'Top'#3#8#1#5'Width'#2'`'#0#0#7'TButton'#7'Bu'
|
||||
+'tton7'#22'BorderSpacing.OnChange'#13#7'Caption'#6#9'AutoWidth'#7'OnClick'#7
|
||||
+#12'Button7Click'#8'TabOrder'#2#6#4'Left'#3#8#1#6'Height'#2#17#3'Top'#3#232#0
|
||||
+#5'Width'#2'C'#0#0#7'TButton'#7'Button8'#22'BorderSpacing.OnChange'#13#7'Cap'
|
||||
+'tion'#6#10'AutoHeight'#7'OnClick'#7#12'Button8Click'#8'TabOrder'#2#7#4'Left'
|
||||
+#3'N'#1#6'Height'#2#17#3'Top'#3#232#0#5'Width'#2'H'#0#0#7'TButton'#7'Button9'
|
||||
+#22'BorderSpacing.OnChange'#13#7'Caption'#6#12'Sort Cols[4]'#7'OnClick'#7#12
|
||||
+'Button9Click'#8'TabOrder'#2#8#4'Left'#3#176#0#6'Height'#2#20#3'Top'#3#167#0
|
||||
+#5'Width'#2'K'#0#0#12'TRadioButton'#12'RadioButton1'#22'BorderSpacing.OnChan'
|
||||
+'ge'#13#7'Caption'#6#9'Ascending'#7'Checked'#9#5'State'#7#9'cbChecked'#8'Tab'
|
||||
+'Order'#2#9#4'Left'#3#3#1#6'Height'#2#23#3'Top'#3#164#0#5'Width'#2'\'#0#0#12
|
||||
+'TRadioButton'#12'RadioButton2'#22'BorderSpacing.OnChange'#13#7'Caption'#6#10
|
||||
+'Descending'#8'TabOrder'#2#10#4'Left'#3#3#1#6'Height'#2#23#3'Top'#3#185#0#5
|
||||
+'Width'#2'f'#0#0#7'TButton'#8'Button10'#22'BorderSpacing.OnChange'#13#7'Capt'
|
||||
+'ion'#6#17'Hide/Show Cols[1]'#7'OnClick'#7#13'Button10Click'#8'TabOrder'#2#11
|
||||
+#4'Left'#2#8#6'Height'#2#25#3'Top'#3#164#0#5'Width'#3#142#0#0#0#7'TButton'#8
|
||||
+'Button11'#22'BorderSpacing.OnChange'#13#7'Caption'#6#5'Clear'#7'OnClick'#7
|
||||
+#13'Button11Click'#8'TabOrder'#2#12#4'Left'#2#8#6'Height'#2#25#3'Top'#3#196#0
|
||||
+#5'Width'#2','#0#0#9'TCheckBox'#9'CheckBox1'#22'BorderSpacing.OnChange'#13#7
|
||||
+'Caption'#6#9'OnlyValue'#8'TabOrder'#2#13#4'Left'#2'<'#6'Height'#2#23#3'Top'
|
||||
+#3#196#0#5'Width'#2'Z'#0#0#6'TPanel'#6'Panel1'#22'BorderSpacing.OnChange'#13
|
||||
+#7'Caption'#6#6'Panel1'#12'ClientHeight'#3#154#0#11'ClientWidth'#3#208#1#11
|
||||
+'FullRepaint'#8#8'TabOrder'#2#14#4'Left'#2#8#6'Height'#3#154#0#3'Top'#2#8#5
|
||||
+'Width'#3#208#1#0#13'TSemaphorGrid'#13'SemaphorGrid1'#9'Alignment'#7#8'taCen'
|
||||
+'ter'#8'Semaphor'#9#9'StringRed'#6#2'no'#12'StringYellow'#6#5'maybe'#11'Stri'
|
||||
+'ngGreen'#6#3'yes'#13'SemaphorShape'#7#6'ssDisk'#22'BorderSpacing.OnChange'
|
||||
+#13#5'Color'#7#7'clWhite'#8'ColCount'#2#5#16'DefaultRowHeight'#2#24#10'Fixed'
|
||||
+'Color'#7#9'clBtnFace'#13'GridLineWidth'#2#0#7'Options'#11#15'goFixedVertLin'
|
||||
+'e'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'goRangeSelect'#14'g'
|
||||
+'oSmoothScroll'#0#8'RowCount'#2#5#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'
|
||||
+#2#0#7'TabStop'#9#15'VisibleColCount'#2#4#15'VisibleRowCount'#2#4#6'Height'#3
|
||||
+#148#0#5'Width'#3#200#1#5'Cells'#1#2#24#2#0#2#0#6#3'a\n'#2#0#2#1#6#1'a'#2#0#2
|
||||
+#2#6#1'b'#2#0#2#3#6#1'c'#2#0#2#4#6#1'd'#2#1#2#0#6#1'1'#2#1#2#1#6#2'no'#2#1#2
|
||||
+#2#6#5'alpha'#2#1#2#3#6#3'zed'#2#1#2#4#6#5'maybe'#2#2#2#0#6#1'2'#2#2#2#1#6#3
|
||||
+'yes'#2#2#2#2#6#9'Salvatore'#2#2#2#3#6#6'0.9877'#2#2#2#4#6#3'yes'#2#3#2#0#6#1
|
||||
+'3'#2#3#2#2#6#2'no'#2#3#2#3#6#7'Coppola'#2#3#2#4#6#5'maybe'#2#4#2#0#6#1'4'#2
|
||||
+#4#2#1#6#1'5'#2#4#2#2#6#2'12'#2#4#2#3#6#2'-1'#2#4#2#4#6#1'2'#0#0#0#0#7'TButt'
|
||||
+'on'#8'Button12'#22'BorderSpacing.OnChange'#13#7'Caption'#6#12'Sort Cols[1]'
|
||||
+#7'OnClick'#7#13'Button12Click'#8'TabOrder'#2#15#4'Left'#3#176#0#6'Height'#2
|
||||
+#18#3'Top'#3#190#0#5'Width'#2'K'#0#0#10'TToggleBox'#10'ToggleBox1'#22'Border'
|
||||
+'Spacing.OnChange'#13#7'Caption'#6#10'UnEditable'#7'OnClick'#7#15'ToggleBox1'
|
||||
+'Click'#8'TabOrder'#2#16#4'Left'#3#128#1#6'Height'#2#25#3'Top'#3#167#0#5'Wid'
|
||||
+'th'#2'Z'#0#0#9'TCheckBox'#9'CheckBox2'#22'BorderSpacing.OnChange'#13#7'Capt'
|
||||
+'ion'#6#10'Only Float'#7'OnClick'#7#14'CheckBox2Click'#8'TabOrder'#2#17#4'Le'
|
||||
+'ft'#3#128#1#6'Height'#2#23#3'Top'#3#203#0#5'Width'#2'Y'#0#0#11'TSaveDialog'
|
||||
+#11'SaveDialog1'#5'Title'#6#12'Save file as'#11'FilterIndex'#2#0#5'Title'#6
|
||||
,#12'Save file as'#4'left'#2'('#3'top'#3'h'#1#0#0#11'TOpenDialog'#11'OpenDial'
|
||||
+'og1'#5'Title'#6#18'Open existing file'#11'FilterIndex'#2#0#5'Title'#6#18'Op'
|
||||
+'en existing file'#4'left'#2#8#3'top'#3'x'#1#0#0#0
|
||||
+#160#1#11'ClientWidth'#3'N'#2#8'OnCreate'#7#11'Form1Create'#13'PixelsPerInch'
|
||||
+#2'`'#18'HorzScrollBar.Page'#3'M'#2#18'VertScrollBar.Page'#3#159#1#4'Left'#3
|
||||
+#183#0#6'Height'#3#160#1#3'Top'#2's'#5'Width'#3'N'#2#0#7'TButton'#7'Button1'
|
||||
+#7'Caption'#6#15'Toggle Semaphor'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2
|
||||
+#1#4'Left'#2#8#6'Height'#2#25#3'Top'#3#232#0#5'Width'#2'p'#0#0#7'TButton'#7
|
||||
+'Button2'#7'Caption'#6#19'Next Semafore Style'#7'OnClick'#7#12'Button2Click'
|
||||
+#8'TabOrder'#2#2#4'Left'#3#128#0#6'Height'#2#25#3'Top'#3#232#0#5'Width'#2'~'
|
||||
+#0#0#7'TButton'#7'Button3'#7'Caption'#6#14'Next Alignment'#7'OnClick'#7#12'B'
|
||||
+'utton3Click'#8'TabOrder'#2#3#4'Left'#2#8#6'Height'#2#25#3'Top'#3#8#1#5'Widt'
|
||||
+'h'#2'r'#0#0#7'TButton'#7'Button4'#7'Caption'#6#5'Close'#7'OnClick'#7#12'But'
|
||||
+'ton4Click'#8'TabOrder'#2#4#4'Left'#3'K'#1#6'Height'#2#25#3'Top'#3#8#1#5'Wid'
|
||||
+'th'#2'K'#0#0#7'TButton'#7'Button5'#7'Caption'#6#12'Save to File'#7'OnClick'
|
||||
+#7#12'Button5Click'#8'TabOrder'#2#5#4'Left'#3#128#0#6'Height'#2#25#3'Top'#3#8
|
||||
+#1#5'Width'#2'X'#0#0#7'TButton'#7'Button6'#7'Caption'#6#14'Load from File'#7
|
||||
+'OnClick'#7#12'Button6Click'#8'TabOrder'#2#6#4'Left'#3#227#0#6'Height'#2#25#3
|
||||
+'Top'#3#8#1#5'Width'#2'`'#0#0#7'TButton'#7'Button7'#7'Caption'#6#9'AutoWidth'
|
||||
+#7'OnClick'#7#12'Button7Click'#8'TabOrder'#2#7#4'Left'#3#8#1#6'Height'#2#17#3
|
||||
+'Top'#3#232#0#5'Width'#2'C'#0#0#7'TButton'#7'Button8'#7'Caption'#6#10'AutoHe'
|
||||
+'ight'#7'OnClick'#7#12'Button8Click'#8'TabOrder'#2#8#4'Left'#3'N'#1#6'Height'
|
||||
+#2#17#3'Top'#3#232#0#5'Width'#2'H'#0#0#7'TButton'#7'Button9'#7'Caption'#6#12
|
||||
+'Sort Cols[4]'#7'OnClick'#7#12'Button9Click'#8'TabOrder'#2#9#4'Left'#3#176#0
|
||||
+#6'Height'#2#20#3'Top'#3#167#0#5'Width'#2'K'#0#0#12'TRadioButton'#12'RadioBu'
|
||||
+'tton1'#7'Caption'#6#9'Ascending'#7'Checked'#9#5'State'#7#9'cbChecked'#8'Tab'
|
||||
+'Order'#2#10#4'Left'#3#3#1#6'Height'#2#13#3'Top'#3#164#0#5'Width'#2'E'#0#0#12
|
||||
+'TRadioButton'#12'RadioButton2'#7'Caption'#6#10'Descending'#8'TabOrder'#2#11
|
||||
+#4'Left'#3#3#1#6'Height'#2#13#3'Top'#3#185#0#5'Width'#2'L'#0#0#7'TButton'#8
|
||||
+'Button10'#7'Caption'#6#17'Hide/Show Cols[1]'#7'OnClick'#7#13'Button10Click'
|
||||
+#8'TabOrder'#2#12#4'Left'#2#8#6'Height'#2#25#3'Top'#3#164#0#5'Width'#3#142#0
|
||||
+#0#0#7'TButton'#8'Button11'#7'Caption'#6#5'Clear'#7'OnClick'#7#13'Button11Cl'
|
||||
+'ick'#8'TabOrder'#2#13#4'Left'#2#8#6'Height'#2#25#3'Top'#3#196#0#5'Width'#2
|
||||
+','#0#0#9'TCheckBox'#9'CheckBox1'#7'Caption'#6#9'OnlyValue'#8'TabOrder'#2#14
|
||||
+#4'Left'#2'<'#6'Height'#2#13#3'Top'#3#196#0#5'Width'#2'C'#0#0#7'TButton'#8'B'
|
||||
+'utton12'#7'Caption'#6#12'Sort Cols[1]'#7'OnClick'#7#13'Button12Click'#8'Tab'
|
||||
+'Order'#2#15#4'Left'#3#176#0#6'Height'#2#18#3'Top'#3#190#0#5'Width'#2'K'#0#0
|
||||
+#10'TToggleBox'#10'ToggleBox1'#7'Caption'#6#10'UnEditable'#7'OnClick'#7#15'T'
|
||||
+'oggleBox1Click'#8'TabOrder'#2#16#4'Left'#3#128#1#6'Height'#2#13#3'Top'#3#167
|
||||
+#0#5'Width'#2'G'#0#0#9'TCheckBox'#9'CheckBox2'#7'Caption'#6#10'Only Float'#7
|
||||
+'OnClick'#7#14'CheckBox2Click'#8'TabOrder'#2#17#4'Left'#3#128#1#6'Height'#2
|
||||
+#13#3'Top'#3#203#0#5'Width'#2'B'#0#0#7'TButton'#8'Button13'#22'BorderSpacing'
|
||||
+'.OnChange'#13#7'Caption'#6#7'AutoFit'#7'OnClick'#7#13'Button13Click'#8'TabO'
|
||||
+'rder'#2#18#4'Left'#3#152#1#6'Height'#2#17#3'Top'#3#232#0#5'Width'#2'H'#0#0
|
||||
+#13'TSemaphorGrid'#13'SemaphorGrid1'#21'Constraints.MaxHeight'#3#160#0#20'Co'
|
||||
+'nstraints.MaxWidth'#3'^'#1#9'Alignment'#7#8'taCenter'#8'Semaphor'#9#9'Strin'
|
||||
+'gRed'#6#2'no'#12'StringYellow'#6#5'maybe'#11'StringGreen'#6#3'yes'#13'Semap'
|
||||
+'horShape'#7#6'ssDisk'#22'BorderSpacing.OnChange'#13#5'Color'#7#7'clWhite'#8
|
||||
+'ColCount'#2#5#16'DefaultRowHeight'#2#24#10'FixedColor'#7#9'clBtnFace'#13'Gr'
|
||||
+'idLineWidth'#2#0#7'Options'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'g'
|
||||
+'oVertLine'#10'goHorzLine'#13'goRangeSelect'#14'goSmoothScroll'#0#8'RowCount'
|
||||
+#2#5#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#7'TabStop'#9#15'Visible'
|
||||
+'ColCount'#2#4#15'VisibleRowCount'#2#4#6'Height'#3#152#0#5'Width'#3'L'#1#5'C'
|
||||
+'ells'#1#2#24#2#0#2#0#6#3'a\n'#2#0#2#1#6#1'a'#2#0#2#2#6#1'b'#2#0#2#3#6#1'c'#2
|
||||
+#0#2#4#6#1'd'#2#1#2#0#6#1'1'#2#1#2#1#6#2'no'#2#1#2#2#6#5'alpha'#2#1#2#3#6#3
|
||||
+'zed'#2#1#2#4#6#5'maybe'#2#2#2#0#6#1'2'#2#2#2#1#6#3'yes'#2#2#2#2#6#8'Semapho'
|
||||
+'r'#2#2#2#3#6#6'0.9877'#2#2#2#4#6#3'yes'#2#3#2#0#6#1'3'#2#3#2#2#6#2'no'#2#3#2
|
||||
+#3#6#4'Grid'#2#3#2#4#6#5'maybe'#2#4#2#0#6#1'4'#2#4#2#1#6#1'5'#2#4#2#2#6#2'12'
|
||||
+#2#4#2#3#6#2'-1'#2#4#2#4#6#1'2'#0#0#0#13'TSemaphorGrid'#13'SemaphorGrid2'#9
|
||||
+'StringRed'#6#2'no'#12'StringYellow'#6#5'maybe'#11'StringGreen'#6#3'yes'#13
|
||||
+'SemaphorShape'#7#6'ssDisk'#8'ColCount'#2#5#10'FixedColor'#7#9'clBtnFace'#13
|
||||
+'GridLineWidth'#2#0#7'Options'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10
|
||||
+'goVertLine'#10'goHorzLine'#13'goRangeSelect'#14'goSmoothScroll'#0#8'RowCoun'
|
||||
+'t'#2#5#10'ScrollBars'#7#10'ssAutoBoth'#15'VisibleColCount'#2#2#15'VisibleRo'
|
||||
+'wCount'#2#4#6'Height'#2'd'#3'Top'#3'1'#1#5'Width'#3#200#0#0#0#13'TSemaphorG'
|
||||
+'rid'#13'SemaphorGrid3'#8'Semaphor'#9#9'StringRed'#6#2'no'#12'StringYellow'#6
|
||||
,#5'maybe'#11'StringGreen'#6#3'yes'#13'SemaphorShape'#7#6'ssDisk'#8'ColCount'
|
||||
+#2#5#10'FixedColor'#7#9'clBtnFace'#13'GridLineWidth'#2#0#7'Options'#11#15'go'
|
||||
+'FixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'goRange'
|
||||
+'Select'#14'goSmoothScroll'#0#8'RowCount'#2#5#10'ScrollBars'#7#10'ssAutoBoth'
|
||||
+#15'VisibleColCount'#2#2#15'VisibleRowCount'#2#4#4'Left'#3'@'#1#6'Height'#2
|
||||
+'d'#3'Top'#3'0'#1#5'Width'#3#200#0#0#0#7'TButton'#8'Button14'#7'Caption'#6#6
|
||||
+'Assign'#7'OnClick'#7#13'Button14Click'#8'TabOrder'#2#19#4'Left'#3#155#1#6'H'
|
||||
+'eight'#2#25#3'Top'#3#7#1#5'Width'#2'K'#0#0#7'TButton'#8'Button15'#22'Border'
|
||||
+'Spacing.OnChange'#13#7'Caption'#6#12'Show Content'#7'OnClick'#7#13'Button15'
|
||||
+'Click'#8'TabOrder'#2#20#4'Left'#3#235#1#6'Height'#2#25#3'Top'#3#7#1#5'Width'
|
||||
+#2'M'#0#0#11'TSaveDialog'#11'SaveDialog1'#5'Title'#6#12'Save file as'#11'Fil'
|
||||
+'terIndex'#2#0#5'Title'#6#12'Save file as'#4'left'#2'('#3'top'#3'h'#1#0#0#11
|
||||
+'TOpenDialog'#11'OpenDialog1'#5'Title'#6#18'Open existing file'#11'FilterInd'
|
||||
+'ex'#2#0#5'Title'#6#18'Open existing file'#4'left'#2#8#3'top'#3'`'#1#0#0#0
|
||||
]);
|
||||
|
@ -38,6 +38,9 @@ type
|
||||
Button10: TButton;
|
||||
Button11: TButton;
|
||||
Button12: TButton;
|
||||
Button13: TButton;
|
||||
Button14: TButton;
|
||||
Button15: TButton;
|
||||
Button2: TButton;
|
||||
Button3: TButton;
|
||||
Button4: TButton;
|
||||
@ -49,15 +52,19 @@ type
|
||||
CheckBox1: TCheckBox;
|
||||
CheckBox2: TCheckBox;
|
||||
OpenDialog1: TOpenDialog;
|
||||
Panel1: TPanel;
|
||||
RadioButton1: TRadioButton;
|
||||
RadioButton2: TRadioButton;
|
||||
SaveDialog1: TSaveDialog;
|
||||
SemaphorGrid1: TSemaphorGrid;
|
||||
SemaphorGrid2: TSemaphorGrid;
|
||||
SemaphorGrid3: TSemaphorGrid;
|
||||
ToggleBox1: TToggleBox;
|
||||
procedure Button10Click(Sender: TObject);
|
||||
procedure Button11Click(Sender: TObject);
|
||||
procedure Button12Click(Sender: TObject);
|
||||
procedure Button13Click(Sender: TObject);
|
||||
procedure Button14Click(Sender: TObject);
|
||||
procedure Button15Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
@ -111,6 +118,28 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button13Click(Sender: TObject);
|
||||
begin
|
||||
SemaphorGrid1.AutoFit;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button14Click(Sender: TObject);
|
||||
begin
|
||||
SemaphorGrid1.AssignToG(SemaphorGrid2,false);
|
||||
SemaphorGrid3.AssignG(SemaphorGrid2,true);
|
||||
end;
|
||||
|
||||
procedure TForm1.Button15Click(Sender: TObject);
|
||||
var strtmp:string;
|
||||
oldCHSEP:char;
|
||||
begin
|
||||
oldCHSEP:=SemaphorGrid1.CHSEP;
|
||||
SemaphorGrid1.CHSEP:=#32;
|
||||
SemaphorGrid1.SaveToString(strtmp,false);
|
||||
ShowMessage(strtmp);
|
||||
SemaphorGrid1.CHSEP:=oldCHSEP;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
begin
|
||||
with SemaphorGrid1 do begin
|
||||
|
@ -20,7 +20,7 @@
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Version Major="1"/>
|
||||
<Version Major="1" Release="1"/>
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="semaphorgrids.pas"/>
|
||||
|
@ -111,12 +111,19 @@ type
|
||||
procedure DrawCell(aCol,aRow: Integer; aRect: TRect; aState:TGridDrawState); override;
|
||||
function DoCompareCells(Acol,ARow,Bcol,BRow: Integer): Integer; override;
|
||||
procedure KeyPress(var Key: Char); override;
|
||||
procedure LoadBase(tabella:TStringList; autoadjust:boolean);
|
||||
procedure SaveBase(tabella:TStringList; addMarker:boolean);
|
||||
procedure LoadFromString(StringName:string; autoadjust:boolean);
|
||||
public
|
||||
{ Public declarations }
|
||||
procedure LoadFromFileG(FileName:string;autoadjust:boolean);
|
||||
procedure LoadFromFileG(FileName:string; autoadjust:boolean);
|
||||
procedure SaveToFileG(FileName:String;addMarker:boolean);
|
||||
procedure SaveToString(var StringName:String; addMarker:boolean);
|
||||
procedure AssignG(SG: TSemaphorGrid; autoadjust:boolean);
|
||||
procedure AssignToG(SG: TSemaphorGrid; autoadjust:boolean);
|
||||
procedure AutoWidth;
|
||||
procedure AutoHeight;
|
||||
procedure AutoFit;
|
||||
procedure ExportToExcel(FileName:string;SelfExt:boolean);
|
||||
procedure DeleteColumn(j:integer);
|
||||
procedure DeleteRow(i:integer);
|
||||
@ -151,7 +158,6 @@ procedure TSemaphorGrid.DrawCell(aCol,aRow: Integer; aRect: TRect; aState:TGridD
|
||||
const dr=4;
|
||||
var Rect:TRect;
|
||||
MyStyle:TTextStyle;
|
||||
OldBrushColor: TColor;
|
||||
begin
|
||||
PrepareCanvas(aCol,aRow,aState);
|
||||
Canvas.FillRect(aRect);
|
||||
@ -159,6 +165,11 @@ begin
|
||||
|
||||
MyStyle:=Canvas.TextStyle;
|
||||
MyStyle.Alignment:=Alignment;
|
||||
//text space
|
||||
aRect.Left:=aRect.Left+dr;
|
||||
aRect.Right:=aRect.Right-dr;
|
||||
aRect.Bottom:=aRect.Bottom-dr;
|
||||
aRect.Top:=aRect.Top+dr;
|
||||
Canvas.TextRect(aRect,aRect.Left, aRect.Top, Cells[aCol,aRow],MyStyle);
|
||||
if not Semaphor then
|
||||
exit;
|
||||
@ -274,17 +285,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.LoadFromFileG(FileName:string;autoadjust:boolean);
|
||||
var i,j:integer;
|
||||
procedure TSemaphorGrid.LoadBase(tabella:TStringList; autoadjust:boolean);
|
||||
var riga:TStringList;
|
||||
strtmp,strFirst:string;
|
||||
tabella,riga:TStringList;
|
||||
i,j:integer;
|
||||
strj:string;
|
||||
begin
|
||||
tabella:=TStringList.Create;
|
||||
riga:=TStringList.Create;
|
||||
tabella.LoadFromFile(Filename);
|
||||
|
||||
strFirst:=tabella.Strings[0];
|
||||
RowCount:=FixedRows+2;//to prevent grid exception
|
||||
ColCount:=FixedCols+2;
|
||||
if pos(SemaphorMarker,strFirst)<>0 then begin
|
||||
Delete(strFirst,1,pos(CHSEP,strFirst));//delete marker+CHSEP
|
||||
j:=pos(CHSEP,strFirst)-1;
|
||||
@ -317,7 +327,7 @@ begin
|
||||
if ColCount<j+1 then
|
||||
ColCount:=j+1;
|
||||
Rows[i-1]:=riga;
|
||||
end
|
||||
end;
|
||||
end else begin
|
||||
RowCount:=FixedRows+1;
|
||||
ColCount:=FixedCols+1;
|
||||
@ -343,7 +353,6 @@ begin
|
||||
Rows[i]:=riga;
|
||||
end
|
||||
end;
|
||||
tabella.Free;
|
||||
riga.Free;
|
||||
|
||||
if autoadjust then
|
||||
@ -368,17 +377,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{ FileName: file to store data }
|
||||
procedure TSemaphorGrid.SaveToFileG(FileName:String;addMarker:boolean);
|
||||
var i,j:integer;
|
||||
procedure TSemaphorGrid.SaveBase(tabella:TStringList; addMarker:boolean);
|
||||
var riga:TStringList;
|
||||
strtmp:string;
|
||||
tabella,riga:TStringList;
|
||||
i,j:integer;
|
||||
begin
|
||||
tabella:=TStringList.Create;
|
||||
riga:=TStringList.Create;
|
||||
if addMarker then begin
|
||||
strtmp:=SemaphorMarker+CHSEP+IntToStr(FixedCols)+CHSEP+IntToStr(FixedRows);//store n° fixed cols and rows
|
||||
for j:=0 to ExWidths.Count-1 do //store the widths of hidden cols if any (and then the hidden cols)
|
||||
for j:=0 to ExWidths.Count-1 do //store the widths of hided cols if any (and then the hided cols)
|
||||
strtmp:=strtmp+CHSEP+ExWidths.Strings[j];
|
||||
tabella.Add(strtmp);
|
||||
end;
|
||||
@ -389,17 +396,70 @@ begin
|
||||
strtmp:=strtmp+CHSEP+riga.Strings[j];
|
||||
tabella.Add(strtmp);
|
||||
end;
|
||||
tabella.SaveToFile(FileName);
|
||||
riga.Free;
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.LoadFromFileG(FileName:string;autoadjust:boolean);
|
||||
var tabella:TStringList;
|
||||
begin
|
||||
tabella:=TStringList.Create;
|
||||
tabella.LoadFromFile(Filename);
|
||||
LoadBase(tabella,autoadjust);
|
||||
tabella.Free;
|
||||
end;
|
||||
|
||||
{ FileName: file to store data }
|
||||
procedure TSemaphorGrid.SaveToFileG(FileName:String;addMarker:boolean);
|
||||
var tabella:TStringList;
|
||||
begin
|
||||
tabella:=TStringList.Create;
|
||||
SaveBase(tabella,addMarker);
|
||||
tabella.SaveToFile(FileName);
|
||||
tabella.Free;
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.LoadFromString(StringName:string; autoadjust:boolean);
|
||||
var tabella:TStringList;
|
||||
begin
|
||||
tabella:=TStringList.Create;
|
||||
tabella.Text:=StringName;
|
||||
LoadBase(tabella,autoadjust);
|
||||
tabella.Free;
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.SaveToString(var StringName:String; addMarker:boolean);
|
||||
var tabella:TStringList;
|
||||
begin
|
||||
tabella:=TStringList.Create;
|
||||
SaveBase(tabella,addMarker);
|
||||
StringName:=tabella.Text;
|
||||
tabella.Free;
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.AssignG(SG: TSemaphorGrid; autoadjust:boolean);
|
||||
var strtmp:string;
|
||||
begin
|
||||
SG.SaveToString(strtmp,true);
|
||||
LoadFromString(strtmp, autoadjust);
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.AssignToG(SG: TSemaphorGrid; autoadjust:boolean);
|
||||
var strtmp:string;
|
||||
begin
|
||||
SaveToString(strtmp,true);
|
||||
SG.LoadFromString(strtmp, autoadjust);
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.AutoWidth;
|
||||
var j,Wtmp:integer;
|
||||
begin
|
||||
Wtmp:=0;
|
||||
if BorderStyle=bsSingle then
|
||||
{$IFDEF WIN32}
|
||||
Wtmp:=Wtmp+2*GetSystemMetrics(SM_CXFIXEDFRAME);
|
||||
{$ELSE}
|
||||
Wtmp:=Wtmp+2*1;//GetSystemMetrics(SM_CXFIXEDFRAME);
|
||||
{$ENDIF}
|
||||
for j:=0 to ColCount-1 do
|
||||
Wtmp:=Wtmp+GridLineWidth+ColWidths[j];
|
||||
Wtmp:=Wtmp-2*GridLineWidth;
|
||||
@ -414,7 +474,11 @@ var i,Htmp:integer;
|
||||
begin
|
||||
Htmp:=0;
|
||||
if BorderStyle=bsSingle then
|
||||
{$IFDEF WIN32}
|
||||
Htmp:=Htmp+2*GetSystemMetrics(SM_CYFIXEDFRAME);
|
||||
{$ELSE}
|
||||
Htmp:=Htmp+2*1;//GetSystemMetrics(SM_CYFIXEDFRAME);
|
||||
{$ENDIF}
|
||||
for i:=0 to RowCount-1 do
|
||||
Htmp:=Htmp+GridLineWidth+RowHeights[i];
|
||||
Htmp:=Htmp-2*GridLineWidth;
|
||||
@ -424,6 +488,16 @@ begin
|
||||
Height:=Htmp;
|
||||
end;
|
||||
|
||||
procedure TSemaphorGrid.AutoFit;
|
||||
begin
|
||||
AutoWidth;
|
||||
AutoHeight;
|
||||
if not ScrollBarIsVisible(SB_Vert) then
|
||||
AutoWidth;
|
||||
if not ScrollBarIsVisible(SB_Horz) then
|
||||
AutoHeight;
|
||||
end;
|
||||
|
||||
{ FileName: file to export data; SelfExt: if true SemaphorGrid change the file
|
||||
extension to xls compatible with MS Excel and maybe other similar, and if there
|
||||
is not extension SemaphorGrid append xls extension to FileName }
|
||||
@ -450,7 +524,6 @@ function TSemaphorGrid.DoCompareCells(Acol, ARow, Bcol, BRow: Integer): Integer;
|
||||
var
|
||||
S1,S2: String;
|
||||
V1,V2: Extended;
|
||||
D1,D2: TDate;
|
||||
begin
|
||||
case FSortType of
|
||||
tsAlphabetic:
|
||||
|
@ -873,6 +873,10 @@ end;
|
||||
function TWidgetSet.GetSystemMetrics(nIndex: Integer): Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
case nIndex of
|
||||
SM_CXEDGE: Result:=2;
|
||||
SM_CYEDGE: Result:=2;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TWidgetSet.GetSystemPaletteEntries(DC: HDC;
|
||||
|
@ -5194,11 +5194,11 @@ begin
|
||||
end;
|
||||
SM_CXEDGE:
|
||||
begin
|
||||
Assert(False, 'Trace:TODO: [TGtkWidgetSet.GetSystemMetrics] --> SM_CXEDGE ');
|
||||
Result := 2;
|
||||
end;
|
||||
SM_CYEDGE:
|
||||
begin
|
||||
Assert(False, 'Trace:TODO: [TGtkWidgetSet.GetSystemMetrics] --> SM_CYEDGE ');
|
||||
Result := 2;
|
||||
end;
|
||||
SM_CXFIXEDFRAME:
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user