Skip to content

Commit b5544ee

Browse files
committed
Add columns to visibility demo to match original code behavior
1 parent 121ad85 commit b5544ee

File tree

2 files changed

+42
-16
lines changed

2 files changed

+42
-16
lines changed

Demos/Advanced/VisibilityDemo.lfm

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object VisibilityForm: TVisibilityForm
1212
OnCreate = FormCreate
1313
OnHide = FormHide
1414
OnShow = FormShow
15-
LCLVersion = '0.9.29'
15+
LCLVersion = '1.7'
1616
object Label17: TLabel
1717
Left = 368
1818
Height = 77
@@ -25,10 +25,10 @@ object VisibilityForm: TVisibilityForm
2525
WordWrap = True
2626
end
2727
object Label1: TLabel
28-
Left = 504
29-
Height = 81
28+
Left = -468
29+
Height = 16
3030
Top = 212
31-
Width = 296
31+
Width = 1268
3232
Anchors = [akTop, akRight]
3333
Caption = 'This sample shows how two treeviews can be synchronized. They can even be adjusted so that it looks as if they share the same background. The splitter between the trees is drawn so that is appears nearly invisible.'
3434
ParentColor = False
@@ -37,10 +37,10 @@ object VisibilityForm: TVisibilityForm
3737
object Label2: TLabel
3838
AnchorSideTop.Control = Label1
3939
AnchorSideTop.Side = asrBottom
40-
Left = 504
41-
Height = 81
42-
Top = 301
43-
Width = 296
40+
Left = -415
41+
Height = 16
42+
Top = 236
43+
Width = 1215
4444
Anchors = [akTop, akRight]
4545
BorderSpacing.Top = 8
4646
Caption = 'The best effect is maybe when doing wheel panning. If you have a wheel mouse then try clicking the middle button (the wheel) in one of the trees and when the special cursor appears move the mouse around.'
@@ -61,10 +61,10 @@ object VisibilityForm: TVisibilityForm
6161
object Label4: TLabel
6262
AnchorSideTop.Control = Label2
6363
AnchorSideTop.Side = asrBottom
64-
Left = 504
65-
Height = 33
66-
Top = 390
67-
Width = 296
64+
Left = 414
65+
Height = 16
66+
Top = 260
67+
Width = 386
6868
Anchors = [akTop, akRight]
6969
BorderSpacing.Top = 8
7070
Caption = ' Expand the trees first (Ctrl Shift +, for full expand) see the full effect.'
@@ -87,7 +87,7 @@ object VisibilityForm: TVisibilityForm
8787
ChildSizing.ShrinkVertical = crsScaleChilds
8888
ChildSizing.Layout = cclLeftToRightThenTopToBottom
8989
ChildSizing.ControlsPerLine = 1
90-
ClientHeight = 91
90+
ClientHeight = 88
9191
ClientWidth = 365
9292
ItemIndex = 0
9393
Items.Strings = (
@@ -8184,14 +8184,39 @@ object VisibilityForm: TVisibilityForm
81848184
Font.Height = -11
81858185
Font.Name = 'Verdana'
81868186
Header.AutoSizeIndex = 0
8187-
Header.Columns = <>
8187+
Header.Columns = <
8188+
item
8189+
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus, coEditable]
8190+
Position = 0
8191+
Text = 'Column 0'
8192+
Width = 100
8193+
end
8194+
item
8195+
Position = 1
8196+
Text = 'Column 1'
8197+
Width = 100
8198+
end
8199+
item
8200+
Position = 2
8201+
Text = 'Column 2'
8202+
Width = 100
8203+
end
8204+
item
8205+
Position = 3
8206+
Text = 'Column 3'
8207+
Width = 100
8208+
end
8209+
item
8210+
Position = 4
8211+
Text = 'Column 4'
8212+
Width = 100
8213+
end>
81888214
Header.DefaultHeight = 17
81898215
Header.Font.Color = clNavy
81908216
Header.Font.Height = -13
81918217
Header.Font.Name = 'Verdana'
81928218
Header.Font.Style = [fsBold]
81938219
Header.Height = 24
8194-
Header.MainColumn = -1
81958220
Header.Options = [hoColumnResize, hoDrag, hoVisible]
81968221
Header.Style = hsFlatButtons
81978222
HintMode = hmTooltip
@@ -8231,6 +8256,7 @@ object VisibilityForm: TVisibilityForm
82318256
Header.DefaultHeight = 17
82328257
Header.Font.Height = -11
82338258
Header.Font.Name = 'MS Sans Serif'
8259+
Header.Height = 17
82348260
Header.MainColumn = -1
82358261
Header.Options = [hoColumnResize, hoDrag]
82368262
HintMode = hmTooltip

Demos/Advanced/VisibilityDemo.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface
1313

1414
uses
1515
LCLIntf, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
16-
StdCtrls, VirtualTrees, ComCtrls, ExtCtrls, LResources;
16+
StdCtrls, VirtualTrees, ExtCtrls, LResources;
1717

1818
type
1919
TVisibilityForm = class(TForm)

0 commit comments

Comments
 (0)