Skip to content

Commit 48b3b4a

Browse files
committed
Demos: fix compilation with recent Lazarus, change resource from lrs to res format
1 parent 82d3388 commit 48b3b4a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+639
-465
lines changed

Demos/Advanced/Advanced.lpi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
</Flags>
1010
<SessionStorage Value="InProjectDir"/>
1111
<MainUnit Value="0"/>
12+
<ResourceType Value="res"/>
1213
</General>
1314
<VersionInfo>
1415
<StringTable ProductVersion=""/>

Demos/Advanced/AlignDemo.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ TAlignForm = class(TForm)
7474

7575
implementation
7676

77+
{$R *.lfm}
78+
7779
uses
7880
Main, States;
7981

@@ -605,7 +607,5 @@ procedure TAlignForm.AlignTreeStateChange(Sender: TBaseVirtualTree; Enter, Leave
605607

606608
//----------------------------------------------------------------------------------------------------------------------
607609

608-
initialization
609-
{$I AlignDemo.lrs}
610610

611611
end.

Demos/Advanced/DrawTreeDemo.lfm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ object DrawTreeForm: TDrawTreeForm
1010
Font.Height = -13
1111
Font.Name = 'Trebuchet MS'
1212
OnCreate = FormCreate
13-
LCLVersion = '0.9.29'
13+
LCLVersion = '1.7'
1414
object Label7: TLabel
1515
Left = 0
1616
Height = 61
@@ -24,9 +24,9 @@ object DrawTreeForm: TDrawTreeForm
2424
end
2525
object Label1: TLabel
2626
Left = 4
27-
Height = 19
28-
Top = 423
29-
Width = 248
27+
Height = 18
28+
Top = 424
29+
Width = 247
3030
Anchors = [akLeft, akBottom]
3131
Caption = 'Adjust vertical image alignment of nodes:'
3232
ParentColor = False
@@ -36,10 +36,10 @@ object DrawTreeForm: TDrawTreeForm
3636
AnchorSideLeft.Side = asrBottom
3737
AnchorSideBottom.Control = TrackBar1
3838
AnchorSideBottom.Side = asrCenter
39-
Left = 424
40-
Height = 19
41-
Top = 422
42-
Width = 23
39+
Left = 423
40+
Height = 18
41+
Top = 424
42+
Width = 22
4343
Anchors = [akLeft, akBottom]
4444
BorderSpacing.Left = 8
4545
Caption = '50%'
@@ -115,9 +115,9 @@ object DrawTreeForm: TDrawTreeForm
115115
AnchorSideLeft.Side = asrBottom
116116
AnchorSideBottom.Control = Label1
117117
AnchorSideBottom.Side = asrCenter
118-
Left = 259
118+
Left = 258
119119
Height = 38
120-
Top = 413
120+
Top = 414
121121
Width = 157
122122
Max = 100
123123
OnChange = TrackBar1Change

Demos/Advanced/DrawTreeDemo.pas

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface
2121
Windows,
2222
{$endif}
2323
LCLIntf, delphicompat, LCLType, SysUtils, Classes, ComCtrls, Graphics, Controls, Forms, Dialogs,
24-
VirtualTrees, StdCtrls, shlobjext, LResources, FileUtil;
24+
VirtualTrees, StdCtrls, shlobjext, LResources;
2525

2626
type
2727
TDrawTreeForm = class(TForm)
@@ -67,8 +67,10 @@ TDrawTreeForm = class(TForm)
6767

6868
implementation
6969

70+
{$R *.lfm}
71+
7072
uses
71-
States;
73+
LazFileUtils, States;
7274

7375
//----------------------------------------------------------------------------------------------------------------------
7476

@@ -744,9 +746,6 @@ procedure TDrawTreeForm.VDT1StateChange(Sender: TBaseVirtualTree; Enter, Leave:
744746
end;
745747

746748
//----------------------------------------------------------------------------------------------------------------------
747-
initialization
748-
749-
{$I DrawTreeDemo.lrs}
750749

751750

752751
end.

Demos/Advanced/GeneralAbilitiesDemo.lfm

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ object GeneralForm: TGeneralForm
1212
KeyPreview = True
1313
OnCreate = FormCreate
1414
ShowHint = True
15-
LCLVersion = '0.9.29'
15+
LCLVersion = '1.7'
1616
object Label18: TLabel
1717
AnchorSideTop.Control = RadioGroup2
1818
AnchorSideTop.Side = asrBottom
19-
Left = 502
20-
Height = 14
21-
Top = 361
22-
Width = 105
19+
Left = 503
20+
Height = 13
21+
Top = 334
22+
Width = 104
2323
Anchors = [akTop, akRight]
2424
BorderSpacing.Top = 20
2525
Caption = 'Switch check images:'
@@ -28,20 +28,20 @@ object GeneralForm: TGeneralForm
2828
object Label19: TLabel
2929
AnchorSideTop.Control = CheckMarkCombo
3030
AnchorSideTop.Side = asrBottom
31-
Left = 504
32-
Height = 14
33-
Top = 418
34-
Width = 98
31+
Left = 505
32+
Height = 13
33+
Top = 390
34+
Width = 97
3535
Anchors = [akTop, akRight]
3636
BorderSpacing.Top = 20
3737
Caption = 'Switch main column:'
3838
ParentColor = False
3939
end
4040
object Label8: TLabel
41-
Left = 488
42-
Height = 40
41+
Left = 51
42+
Height = 13
4343
Top = 40
44-
Width = 232
44+
Width = 669
4545
Anchors = [akTop, akRight]
4646
Caption = 'This sample is an introduction to the general look and feel of Virtual Treeview. Note: you can change almost every visual aspect of the control.'
4747
ParentColor = False
@@ -138,7 +138,7 @@ object GeneralForm: TGeneralForm
138138
AnchorSideTop.Side = asrBottom
139139
Left = 488
140140
Height = 21
141-
Top = 377
141+
Top = 349
142142
Width = 216
143143
Anchors = [akTop, akRight]
144144
BorderSpacing.Top = 2
@@ -164,18 +164,18 @@ object GeneralForm: TGeneralForm
164164
AnchorSideTop.Side = asrBottom
165165
Left = 488
166166
Height = 16
167-
Top = 434
167+
Top = 405
168168
Width = 37
169169
Anchors = [akTop, akRight]
170170
BorderSpacing.Top = 2
171-
Min = 0
172-
Max = 2
173171
Increment = 2
172+
Max = 2
173+
Min = 0
174+
OnChanging = MainColumnUpDownChanging
174175
Orientation = udHorizontal
175176
Position = 2
176177
TabOrder = 2
177178
Wrap = True
178-
OnChanging = MainColumnUpDownChanging
179179
end
180180
object BitBtn1: TBitBtn
181181
Left = 488
@@ -200,7 +200,6 @@ object GeneralForm: TGeneralForm
200200
33333300C000CC0333333333333330CCCCCCCC03333333333333300000000033
201201
3333333333333333333333333333333333333333333333333333
202202
}
203-
NumGlyphs = 0
204203
OnClick = BitBtn1Click
205204
TabOrder = 3
206205
end
@@ -209,7 +208,7 @@ object GeneralForm: TGeneralForm
209208
AnchorSideTop.Side = asrBottom
210209
Left = 488
211210
Height = 77
212-
Top = 177
211+
Top = 150
213212
Width = 216
214213
Anchors = [akTop, akRight]
215214
AutoFill = True
@@ -238,7 +237,7 @@ object GeneralForm: TGeneralForm
238237
AnchorSideTop.Side = asrBottom
239238
Left = 488
240239
Height = 77
241-
Top = 264
240+
Top = 237
242241
Width = 216
243242
Anchors = [akTop, akRight]
244243
AutoFill = True
@@ -268,7 +267,7 @@ object GeneralForm: TGeneralForm
268267
AnchorSideTop.Side = asrBottom
269268
Left = 488
270269
Height = 77
271-
Top = 90
270+
Top = 63
272271
Width = 216
273272
Anchors = [akTop, akRight]
274273
AutoFill = True
@@ -299,7 +298,6 @@ object GeneralForm: TGeneralForm
299298
Width = 99
300299
Anchors = [akTop, akRight]
301300
Caption = 'Save as text...'
302-
NumGlyphs = 0
303301
OnClick = SaveButtonClick
304302
TabOrder = 7
305303
end

Demos/Advanced/GeneralAbilitiesDemo.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ TGeneralForm = class(TForm)
8585

8686
implementation
8787

88+
{$R *.lfm}
89+
8890
uses
8991
States;
9092

@@ -565,7 +567,5 @@ procedure TGeneralForm.VST2DragOver(Sender: TBaseVirtualTree; Source: TObject; S
565567

566568
//----------------------------------------------------------------------------------------------------------------------
567569

568-
initialization
569-
{$i GeneralAbilitiesDemo.lrs}
570570

571571
end.

Demos/Advanced/GridDemo.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ TGridForm = class(TForm)
5454

5555
implementation
5656

57+
{$R *.lfm}
58+
5759
uses
5860
Editors, States;
5961

@@ -229,7 +231,5 @@ procedure TGridForm.VST5StateChange(Sender: TBaseVirtualTree; Enter, Leave: TVir
229231

230232
//----------------------------------------------------------------------------------------------------------------------
231233

232-
initialization
233-
{$i GridDemo.lrs}
234234

235235
end.

Demos/Advanced/HeaderCustomDrawDemo.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ THeaderOwnerDrawForm = class(TForm)
5252

5353
implementation
5454

55+
{$R *.lfm}
56+
5557
uses
5658
States, LclExt;
5759

@@ -306,7 +308,6 @@ procedure THeaderOwnerDrawForm.HeaderCustomDrawTreeGetText(Sender: TBaseVirtualT
306308
//----------------------------------------------------------------------------------------------------------------------
307309

308310
initialization
309-
{$i HeaderCustomDrawDemo.lrs}
310311
{$i bitmap.lrs}
311312

312313
end.

Demos/Advanced/Main.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ procedure SetStatusbarText(const S: string);
4848

4949
implementation
5050

51+
{$R *.lfm}
52+
5153
uses
5254
SpeedDemo, GeneralAbilitiesDemo, DrawTreeDemo, PropertiesDemo,
5355
GridDemo, VisibilityDemo, AlignDemo, WindowsXPStyleDemo, MultilineDemo, HeaderCustomDrawDemo,
@@ -172,7 +174,6 @@ procedure TMainForm.FormShow(Sender: TObject);
172174
//----------------------------------------------------------------------------------------------------------------------
173175

174176
initialization
175-
{$i Main.lrs}
176177
{$i unicode.lrs}
177178

178179
end.

Demos/Advanced/MultilineDemo.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ TNodeForm = class(TForm)
3737

3838
implementation
3939

40+
{$R *.lfm}
41+
4042
uses
4143
Main, States;
4244

@@ -153,7 +155,5 @@ procedure TNodeForm.AutoAdjustCheckBoxClick(Sender: TObject);
153155

154156
//----------------------------------------------------------------------------------------------------------------------
155157

156-
initialization
157-
{$i MultilineDemo.lrs}
158158

159159
end.

0 commit comments

Comments
 (0)