* Advanced demo: fix layout to look good on all platforms + cleaunp

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1103 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2009-12-31 11:39:42 +00:00
parent 2350cbe7ab
commit 86d2440a32
13 changed files with 328 additions and 290 deletions

View File

@ -1,12 +1,12 @@
object AlignForm: TAlignForm
Left = 370
Height = 497
Height = 486
Top = 299
Width = 785
Width = 783
ActiveControl = AlignTree
Caption = 'AlignForm'
ClientHeight = 497
ClientWidth = 785
ClientHeight = 486
ClientWidth = 783
Constraints.MinWidth = 590
Font.Height = -13
Font.Name = 'Arial'
@ -26,10 +26,9 @@ object AlignForm: TAlignForm
end
object Label1: TLabel
Left = 8
Height = 123
Height = 144
Top = 110
Width = 201
AutoSize = False
Width = 202
Caption = 'Note that hints are aligned properly and draw selection takes the alignment into account too. Sort arrows are shown but the tree is not sorted. All I want to demonstrate is how well the layout in the header works.'
ParentColor = False
ShowAccelChar = False
@ -37,45 +36,45 @@ object AlignForm: TAlignForm
end
object Label2: TLabel
Left = 220
Height = 17
Top = 346
Height = 18
Top = 353
Width = 116
Anchors = [akLeft, akBottom]
Caption = 'English text column'
ParentColor = False
end
object Label3: TLabel
Left = 360
Height = 17
Top = 346
Left = 393
Height = 18
Top = 353
Width = 108
Anchors = [akBottom]
Caption = 'Greek text column'
ParentColor = False
end
object Label4: TLabel
Left = 619
Height = 17
Top = 346
Width = 155
Left = 566
Height = 18
Top = 352
Width = 157
Anchors = [akRight, akBottom]
Caption = 'Hebrew/arabic text column'
ParentColor = False
end
object Label5: TLabel
Left = 8
Height = 17
Top = 278
Width = 121
Height = 18
Top = 288
Width = 122
Anchors = [akLeft, akBottom]
Caption = 'Header button layout'
ParentColor = False
end
object AlignTree: TVirtualStringTree
Left = 220
Height = 335
Left = 215
Height = 336
Top = 2
Width = 554
Width = 565
Anchors = [akTop, akLeft, akRight, akBottom]
CheckImageKind = ckDarkTick
ClipboardFormats.Strings = (
@ -106,7 +105,7 @@ object AlignForm: TAlignForm
Position = 0
Spacing = 10
Text = 'English text column'
Width = 185
Width = 190
end
item
Hint = 'Text is initially left aligned and has a left-to-right directionality.'
@ -115,7 +114,7 @@ object AlignForm: TAlignForm
Position = 1
Spacing = 10
Text = 'Greek text column'
Width = 155
Width = 160
end
item
BiDiMode = bdRightToLeft
@ -125,7 +124,7 @@ object AlignForm: TAlignForm
Position = 2
Spacing = 10
Text = 'Hebrew/arabic text column'
Width = 209
Width = 214
end>
Header.DefaultHeight = 17
Header.Font.Height = -12
@ -146,7 +145,7 @@ object AlignForm: TAlignForm
TabOrder = 0
TreeOptions.AnimationOptions = [toAnimatedToggle]
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoTristateTracking, toAutoDeleteMovedNodes]
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
TreeOptions.MiscOptions = [toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toThemeAware]
TreeOptions.SelectionOptions = [toExtendedFocus, toMultiSelect]
OnFocusChanged = AlignTreeFocusChanged
@ -161,11 +160,11 @@ object AlignForm: TAlignForm
end
object AlignCombo0: TComboBox
Left = 220
Height = 24
Top = 368
Height = 31
Top = 369
Width = 130
Anchors = [akLeft, akBottom]
ItemHeight = 16
ItemHeight = 0
Items.Strings = (
'Left'
'Right'
@ -177,12 +176,12 @@ object AlignForm: TAlignForm
end
object AlignCombo1: TComboBox
Tag = 1
Left = 360
Height = 24
Top = 368
Left = 393
Height = 31
Top = 369
Width = 130
Anchors = [akBottom]
ItemHeight = 16
ItemHeight = 0
Items.Strings = (
'Left'
'Right'
@ -194,12 +193,12 @@ object AlignForm: TAlignForm
end
object AlignCombo2: TComboBox
Tag = 2
Left = 640
Height = 24
Left = 566
Height = 31
Top = 368
Width = 130
Anchors = [akRight, akBottom]
ItemHeight = 16
ItemHeight = 0
Items.Strings = (
'Left'
'Right'
@ -212,7 +211,7 @@ object AlignForm: TAlignForm
object BidiGroup0: TRadioGroup
Left = 220
Height = 61
Top = 400
Top = 408
Width = 130
Anchors = [akLeft, akBottom]
AutoFill = True
@ -225,7 +224,7 @@ object AlignForm: TAlignForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 43
ClientHeight = 42
ClientWidth = 126
Items.Strings = (
'left-to-right'
@ -236,9 +235,9 @@ object AlignForm: TAlignForm
end
object BidiGroup1: TRadioGroup
Tag = 1
Left = 360
Left = 393
Height = 61
Top = 400
Top = 407
Width = 130
Anchors = [akBottom]
AutoFill = True
@ -251,7 +250,7 @@ object AlignForm: TAlignForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 43
ClientHeight = 42
ClientWidth = 126
Items.Strings = (
'left-to-right'
@ -262,9 +261,9 @@ object AlignForm: TAlignForm
end
object BidiGroup2: TRadioGroup
Tag = 2
Left = 640
Left = 566
Height = 61
Top = 400
Top = 408
Width = 130
Anchors = [akRight, akBottom]
AutoFill = True
@ -277,7 +276,7 @@ object AlignForm: TAlignForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 43
ClientHeight = 42
ClientWidth = 126
Items.Strings = (
'left-to-right'
@ -289,18 +288,18 @@ object AlignForm: TAlignForm
object GroupBox1: TGroupBox
Left = 8
Height = 129
Top = 332
Top = 340
Width = 157
Anchors = [akLeft, akBottom]
Caption = ' Header options: '
ClientHeight = 111
ClientHeight = 110
ClientWidth = 153
TabOrder = 7
object ShowGlyphsOptionBox: TCheckBox
Left = 12
Height = 20
Height = 22
Top = 4
Width = 92
Width = 99
Caption = 'Show glyphs'
OnClick = OptionBoxClick
TabOrder = 0
@ -308,9 +307,9 @@ object AlignForm: TAlignForm
object HotTrackOptionBox: TCheckBox
Tag = 1
Left = 12
Height = 20
Height = 22
Top = 25
Width = 71
Width = 78
Caption = 'Hot track'
OnClick = OptionBoxClick
TabOrder = 1
@ -318,9 +317,9 @@ object AlignForm: TAlignForm
object ShowTextOptionBox: TCheckBox
Tag = 2
Left = 12
Height = 20
Height = 22
Top = 46
Width = 76
Width = 83
Caption = 'Show text'
OnClick = OptionBoxClick
TabOrder = 2
@ -328,9 +327,9 @@ object AlignForm: TAlignForm
object VisibleOptionBox: TCheckBox
Tag = 3
Left = 12
Height = 20
Height = 22
Top = 67
Width = 57
Width = 63
Caption = 'Visible'
OnClick = OptionBoxClick
TabOrder = 3
@ -338,9 +337,9 @@ object AlignForm: TAlignForm
object EnabledOptionBox: TCheckBox
Tag = 4
Left = 12
Height = 20
Height = 22
Top = 88
Width = 65
Width = 71
Caption = 'Enabled'
OnClick = OptionBoxClick
TabOrder = 4
@ -348,11 +347,11 @@ object AlignForm: TAlignForm
end
object LayoutCombo: TComboBox
Left = 8
Height = 24
Top = 300
Width = 130
Height = 31
Top = 304
Width = 157
Anchors = [akLeft, akBottom]
ItemHeight = 16
ItemHeight = 0
Items.Strings = (
'Glyph left'
'Glyph right'

View File

@ -1,18 +1,20 @@
object DrawTreeForm: TDrawTreeForm
Left = 333
Height = 477
Height = 453
Top = 339
Width = 710
ActiveControl = VDT1
Caption = 'DrawTreeForm'
ClientHeight = 477
ClientHeight = 453
ClientWidth = 710
Font.Height = -13
Font.Name = 'Trebuchet MS'
OnCreate = FormCreate
LCLVersion = '0.9.27'
LCLVersion = '0.9.29'
object Label7: TLabel
Left = 0
Height = 61
Top = 0
Width = 710
Align = alTop
AutoSize = False
@ -22,31 +24,35 @@ object DrawTreeForm: TDrawTreeForm
end
object Label1: TLabel
Left = 4
Height = 19
Top = 380
Width = 248
Height = 18
Top = 424
Width = 274
Anchors = [akLeft, akBottom]
Caption = 'Adjust vertical image alignment of nodes:'
ParentColor = False
end
object Label3: TLabel
Left = 424
Height = 19
Top = 380
Width = 23
AnchorSideLeft.Control = TrackBar1
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = TrackBar1
AnchorSideBottom.Side = asrCenter
Left = 450
Height = 18
Top = 424
Width = 30
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
Caption = '50%'
ParentColor = False
end
object VDT1: TVirtualDrawTree
Left = 10
Height = 278
Top = 84
Height = 330
Top = 81
Width = 684
Anchors = [akTop, akLeft, akRight, akBottom]
AutoExpandDelay = 200
AutoScrollDelay = 200
BorderStyle = bsSingle
ClipboardFormats.Strings = (
'Virtual Tree Data'
)
@ -59,6 +65,7 @@ object DrawTreeForm: TDrawTreeForm
Header.Columns = <
item
Options = [coAllowClick, coEnabled, coParentColor, coResizable, coShowDropMark, coVisible]
Position = 0
Text = 'Image file name'
Width = 217
end
@ -72,6 +79,7 @@ object DrawTreeForm: TDrawTreeForm
Text = 'Properties'
Width = 160
end>
Header.DefaultHeight = 17
Header.Height = 22
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoRestrictDrag, hoShowSortGlyphs, hoVisible]
Header.ParentFont = True
@ -103,15 +111,20 @@ object DrawTreeForm: TDrawTreeForm
OnStateChange = VDT1StateChange
end
object TrackBar1: TTrackBar
Left = 264
Height = 33
Top = 367
AnchorSideLeft.Control = Label1
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = Label1
AnchorSideBottom.Side = asrCenter
Left = 285
Height = 38
Top = 414
Width = 157
Max = 100
OnChange = TrackBar1Change
Position = 50
TickStyle = tsNone
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 7
TabOrder = 1
end
object SystemImages: TImageList

View File

@ -1,7 +1,6 @@
unit DrawTreeDemo;
{$MODE Delphi}
{$H+}
// Virtual Treeview sample form demonstrating following features:
// - General use of TVirtualDrawTree.
@ -15,16 +14,6 @@ unit DrawTreeDemo;
// Otherwise disable the conditional symbol to compile this demo.
{$ifdef COMPILER_7_UP}
// For some things to work we need code, which is classified as being unsafe for .NET.
// Additionally, there are a few platform warnings, which also have no meaning at all for this project.
{$warn UNSAFE_TYPE off}
{$warn UNSAFE_CAST off}
{$warn UNSAFE_CODE off}
{$warn SYMBOL_PLATFORM off}
{$warn UNIT_PLATFORM off}
{$endif COMPILER_7_UP}
interface
uses

View File

@ -3,7 +3,7 @@ object GeneralForm: TGeneralForm
Height = 536
Top = 185
Width = 722
ActiveControl = VST2
ActiveControl = BitBtn1
Caption = 'GeneralForm'
ClientHeight = 536
ClientWidth = 722
@ -16,10 +16,10 @@ object GeneralForm: TGeneralForm
object Label18: TLabel
AnchorSideTop.Control = RadioGroup2
AnchorSideTop.Side = asrBottom
Left = 499
Left = 488
Height = 14
Top = 374
Width = 105
Top = 383
Width = 119
Anchors = [akTop, akRight]
BorderSpacing.Top = 20
Caption = 'Switch check images:'
@ -28,28 +28,28 @@ object GeneralForm: TGeneralForm
object Label19: TLabel
AnchorSideTop.Control = CheckMarkCombo
AnchorSideTop.Side = asrBottom
Left = 499
Left = 488
Height = 14
Top = 431
Width = 98
Top = 450
Width = 114
Anchors = [akTop, akRight]
BorderSpacing.Top = 20
Caption = 'Switch main column:'
ParentColor = False
end
object Label8: TLabel
Left = 499
Height = 53
Left = 488
Height = 62
Top = 40
Width = 206
Width = 232
Anchors = [akTop, akRight]
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.'
ParentColor = False
WordWrap = True
end
object VST2: TVirtualStringTree
Left = 14
Height = 485
Left = 5
Height = 523
Top = 8
Width = 474
Anchors = [akTop, akLeft, akRight, akBottom]
@ -136,13 +136,13 @@ object GeneralForm: TGeneralForm
object CheckMarkCombo: TComboBox
AnchorSideTop.Control = Label18
AnchorSideTop.Side = asrBottom
Left = 499
Height = 21
Top = 390
Width = 205
Left = 488
Height = 31
Top = 399
Width = 216
Anchors = [akTop, akRight]
BorderSpacing.Top = 2
ItemHeight = 13
ItemHeight = 0
Items.Strings = (
'Light check marks'
'Dark check marks'
@ -162,9 +162,9 @@ object GeneralForm: TGeneralForm
object MainColumnUpDown: TUpDown
AnchorSideTop.Control = Label19
AnchorSideTop.Side = asrBottom
Left = 499
Left = 488
Height = 16
Top = 447
Top = 466
Width = 37
Anchors = [akTop, akRight]
BorderSpacing.Top = 2
@ -178,11 +178,11 @@ object GeneralForm: TGeneralForm
OnChanging = MainColumnUpDownChanging
end
object BitBtn1: TBitBtn
Left = 499
Left = 488
Height = 30
Hint = 'Pick a font to be used by this tree.'
Top = 8
Width = 91
Width = 99
Anchors = [akTop, akRight]
Caption = 'Tree font'
Glyph.Data = {
@ -207,10 +207,10 @@ object GeneralForm: TGeneralForm
object RadioGroup1: TRadioGroup
AnchorSideTop.Control = ThemeRadioGroup
AnchorSideTop.Side = asrBottom
Left = 499
Left = 488
Height = 77
Top = 190
Width = 205
Top = 199
Width = 216
Anchors = [akTop, akRight]
AutoFill = True
BorderSpacing.Top = 10
@ -223,8 +223,8 @@ object GeneralForm: TGeneralForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 59
ClientWidth = 201
ClientHeight = 62
ClientWidth = 212
ItemIndex = 0
Items.Strings = (
'Usual +/- buttons and lines'
@ -236,10 +236,10 @@ object GeneralForm: TGeneralForm
object RadioGroup2: TRadioGroup
AnchorSideTop.Control = RadioGroup1
AnchorSideTop.Side = asrBottom
Left = 499
Left = 488
Height = 77
Top = 277
Width = 205
Top = 286
Width = 216
Anchors = [akTop, akRight]
AutoFill = True
BorderSpacing.Top = 10
@ -252,8 +252,8 @@ object GeneralForm: TGeneralForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 59
ClientWidth = 201
ClientHeight = 62
ClientWidth = 212
ItemIndex = 1
Items.Strings = (
'Dotted rectangle'
@ -266,10 +266,10 @@ object GeneralForm: TGeneralForm
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label8
AnchorSideTop.Side = asrBottom
Left = 499
Left = 488
Height = 77
Top = 103
Width = 205
Top = 112
Width = 216
Anchors = [akTop, akRight]
AutoFill = True
BorderSpacing.Left = 10
@ -283,8 +283,8 @@ object GeneralForm: TGeneralForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 59
ClientWidth = 201
ClientHeight = 62
ClientWidth = 212
Items.Strings = (
'Theme aware'
'Not theme aware'
@ -293,10 +293,10 @@ object GeneralForm: TGeneralForm
TabOrder = 6
end
object SaveButton: TBitBtn
Left = 613
Left = 608
Height = 30
Top = 8
Width = 91
Width = 99
Anchors = [akTop, akRight]
Caption = 'Save as text...'
NumGlyphs = 0

View File

@ -1,34 +1,35 @@
object GridForm: TGridForm
Left = 341
Height = 432
Height = 393
Top = 353
Width = 736
ActiveControl = VST5
Caption = 'GridForm'
ClientHeight = 432
ClientHeight = 393
ClientWidth = 736
Font.Height = -13
Font.Name = 'MS Sans Serif'
OnCreate = FormCreate
LCLVersion = '0.9.27'
LCLVersion = '0.9.29'
object Label15: TLabel
Left = 524
Height = 153
Left = 519
Height = 186
Top = 8
Width = 195
Width = 208
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'This sample demonstrates the grid extensions introduced in Virtual Treeview. The main difference to normal mode is the way cell content is handled (editing, selection etc.). In Grid mode always the entire cell is used. Another point is the key handling .'
ParentColor = False
WordWrap = True
end
object Label1: TLabel
Left = 526
Height = 109
Top = 168
Width = 195
AnchorSideTop.Control = Label15
AnchorSideTop.Side = asrBottom
Left = 519
Height = 81
Top = 202
Width = 205
Anchors = [akTop, akRight]
AutoSize = False
BorderSpacing.Top = 8
Caption = 'The main column in this sample is reduced to an indicator and is set as a fixed column.'
ParentColor = False
WordWrap = True
@ -36,7 +37,7 @@ object GridForm: TGridForm
object VST5: TVirtualStringTree
Cursor = 63
Left = 8
Height = 384
Height = 385
Top = 6
Width = 499
Anchors = [akTop, akLeft, akRight, akBottom]
@ -62,6 +63,7 @@ object GridForm: TGridForm
Header.Columns = <
item
Options = [coParentBidiMode, coVisible, coFixed]
Position = 0
Width = 20
end
item
@ -88,6 +90,7 @@ object GridForm: TGridForm
Text = 'Order date'
Width = 100
end>
Header.DefaultHeight = 17
Header.Font.Height = -12
Header.Font.Name = 'Microsoft Sans Serif'
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoShowImages, hoVisible]
@ -115,10 +118,10 @@ object GridForm: TGridForm
OnStateChange = VST5StateChange
end
object GridLineCheckBox: TCheckBox
Left = 562
Height = 20
Top = 366
Width = 121
Left = 520
Height = 22
Top = 361
Width = 130
Anchors = [akRight, akBottom]
Caption = 'Toggle grid lines'
Checked = True

View File

@ -14,11 +14,10 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
LCLVersion = '0.9.29'
object Label8: TLabel
Left = 12
Height = 83
Top = 318
Height = 102
Top = 320
Width = 745
Anchors = [akLeft, akRight, akBottom]
AutoSize = False
Caption = 'This page demonstrates the advance custom draw mode for a tree''s header. The left column is drawn as usual while with the other columns more and more details are customized by the applicaiton. Note: Virtual Treeview allows to customize the header fully or only parts of it and draws all standard elements as normal if they are not handled by the application. This allows very flexible designs but avoids full custom draw if only a small details must be drawn differently.'
Font.Height = -13
Font.Name = 'MS Sans Serif'

View File

@ -1,13 +1,14 @@
object MainForm: TMainForm
Left = 17
Height = 566
Top = 86
Width = 980
Left = 209
Height = 583
Top = 179
Width = 981
HorzScrollBar.Page = 979
VertScrollBar.Page = 565
ActiveControl = PageScroller1
Caption = 'Virtual Treeview features demo'
ClientHeight = 566
ClientWidth = 980
ClientHeight = 583
ClientWidth = 981
Font.Height = -13
Font.Name = 'MS Sans Serif'
OnCreate = FormCreate
@ -18,10 +19,10 @@ object MainForm: TMainForm
Left = 0
Height = 77
Top = 0
Width = 980
Width = 981
Align = alTop
ClientHeight = 77
ClientWidth = 980
ClientWidth = 981
Color = clWhite
ParentColor = False
ParentShowHint = False
@ -29,12 +30,12 @@ object MainForm: TMainForm
TabOrder = 0
object MainPanel: TPanel
Left = 0
Height = 70
Height = 72
Top = 0
Width = 976
AutoSize = True
BevelOuter = bvNone
ClientHeight = 70
ClientHeight = 72
ClientWidth = 976
Color = clWhite
ParentColor = False
@ -43,8 +44,9 @@ object MainForm: TMainForm
Left = 216
Height = 70
Hint = 'The speed breakthrough'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
360D0000424D360D000000000000360400002800000030000000300000000100
@ -163,8 +165,9 @@ object MainForm: TMainForm
Left = 285
Height = 70
Hint = 'General abilities and features'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
360D0000424D360D000000000000360400002800000030000000300000000100
@ -283,8 +286,9 @@ object MainForm: TMainForm
Left = 354
Height = 70
Hint = 'Property tree simulation'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
36140000424D3614000000000000360400002800000040000000400000000100
@ -459,8 +463,9 @@ object MainForm: TMainForm
Left = 423
Height = 70
Hint = 'Hide and show nodes, sync two trees'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
360D0000424D360D000000000000360400002800000030000000300000000100
@ -579,8 +584,9 @@ object MainForm: TMainForm
Left = 492
Height = 70
Hint = 'Tree in grid simulation'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
360D0000424D360D000000000000360400002800000030000000300000000100
@ -699,8 +705,9 @@ object MainForm: TMainForm
Left = 561
Height = 70
Hint = 'A paint tree as directory tree'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
360D0000424D360D000000000000360400002800000030000000300000000100
@ -819,8 +826,9 @@ object MainForm: TMainForm
Left = 630
Height = 70
Hint = 'Alignment, directionality and internationalization'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
36140000424D3614000000000000360400002800000040000000400000000100
@ -993,8 +1001,8 @@ object MainForm: TMainForm
object Label1: TLabel
Left = 0
Height = 14
Top = 26
Width = 73
Top = 14
Width = 76
Caption = 'Demo picker'
Font.Height = -11
Font.Name = 'MS Sans Serif'
@ -1004,9 +1012,9 @@ object MainForm: TMainForm
end
object Label2: TLabel
Left = 0
Height = 17
Top = 42
Width = 197
Height = 18
Top = 30
Width = 217
Caption = 'Which demo do you want to see?'
ParentColor = False
end
@ -1015,8 +1023,9 @@ object MainForm: TMainForm
Left = 699
Height = 70
Hint = 'Painting like in Windows XP'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
361B0000424D361B000000000000360000002800000030000000300000000100
@ -1247,8 +1256,9 @@ object MainForm: TMainForm
Left = 768
Height = 70
Hint = 'Multiline nodes'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
96270000424D962700000000000036000000280000003C000000380000000100
@ -1578,8 +1588,9 @@ object MainForm: TMainForm
Left = 837
Height = 70
Hint = 'Custom header drawing in advanced mode'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
361F0000424D361F000000000000360000002800000029000000400000000100
@ -1842,8 +1853,9 @@ object MainForm: TMainForm
Left = 906
Height = 70
Hint = 'Exit'
Top = 0
Top = 2
Width = 70
BorderSpacing.Top = 2
Color = clBtnFace
Glyph.Data = {
360D0000424D360D000000000000360400002800000030000000300000000100
@ -1961,16 +1973,16 @@ object MainForm: TMainForm
end
object StatusBar: TStatusBar
Left = 0
Height = 20
Top = 546
Width = 980
Height = 21
Top = 562
Width = 981
Panels = <>
end
object ContainerPanel: TPanel
Left = 0
Height = 469
Height = 485
Top = 77
Width = 980
Width = 981
Align = alClient
BevelOuter = bvNone
TabOrder = 1

View File

@ -3,21 +3,20 @@ object NodeForm: TNodeForm
Height = 542
Top = 332
Width = 773
ActiveControl = MLTree
ActiveControl = Panel1
Caption = 'NodeForm'
ClientHeight = 542
ClientWidth = 773
Font.Height = -13
Font.Name = 'MS Sans Serif'
OnCreate = FormCreate
LCLVersion = '0.9.27'
LCLVersion = '0.9.29'
object Label8: TLabel
Left = 12
Height = 72
Top = 429
Height = 102
Top = 424
Width = 732
Anchors = [akLeft, akRight, akBottom]
AutoSize = False
Caption = 'Since Virtual Treeview uses Unicode for text display it is not easy to provide multiline support on Windows 9x/Me systems. Under Windows NT (4.0, 2000, XP) there is support by the operation system and so full word breaking is possible there. Otherwise you have to insert line breaks manually to have multiline captions. Of course there is no difference in handling between multiline and single line nodes (except for the vertical alignment of the latter).'
ParentColor = False
ShowAccelChar = False
@ -52,13 +51,16 @@ object NodeForm: TNodeForm
Colors.SelectionRectangleBlendColor = 10539203
DefaultNodeHeight = 130
DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 1
Width = 483
Width = 495
end
item
Position = 0
end>
Header.DefaultHeight = 17
Header.Font.Height = -11
Header.Font.Name = 'MS Sans Serif'
Header.Options = [hoAutoResize, hoColumnResize, hoDrag]
@ -86,9 +88,9 @@ object NodeForm: TNodeForm
end
object AutoAdjustCheckBox: TCheckBox
Left = 12
Height = 20
Top = 401
Width = 286
Height = 22
Top = 399
Width = 327
Anchors = [akLeft, akBottom]
Caption = 'Automatically adjust node height to node text.'
OnClick = AutoAdjustCheckBoxClick

View File

@ -1,11 +1,11 @@
object PropertiesForm: TPropertiesForm
Left = 397
Height = 419
Height = 389
Top = 294
Width = 637
ActiveControl = VST3
Caption = 'PropertiesForm'
ClientHeight = 419
ClientHeight = 389
ClientWidth = 637
Font.Height = -13
Font.Name = 'MS Sans Serif'
@ -13,7 +13,7 @@ object PropertiesForm: TPropertiesForm
LCLVersion = '0.9.29'
object Label9: TLabel
Left = 420
Height = 65
Height = 81
Top = 6
Width = 212
Anchors = [akTop, akRight]
@ -25,8 +25,8 @@ object PropertiesForm: TPropertiesForm
AnchorSideTop.Control = Label9
AnchorSideTop.Side = asrBottom
Left = 420
Height = 49
Top = 81
Height = 81
Top = 97
Width = 212
Anchors = [akTop, akRight]
BorderSpacing.Top = 10
@ -36,7 +36,7 @@ object PropertiesForm: TPropertiesForm
end
object VST3: TVirtualStringTree
Left = 10
Height = 369
Height = 380
Top = 6
Width = 399
Anchors = [akTop, akLeft, akRight, akBottom]
@ -56,7 +56,7 @@ object PropertiesForm: TPropertiesForm
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAutoSpring]
Position = 1
Text = 'Values'
Width = 192
Width = 194
end>
Header.DefaultHeight = 17
Header.Font.Height = -11
@ -92,7 +92,7 @@ object PropertiesForm: TPropertiesForm
object RadioGroup1: TRadioGroup
Left = 416
Height = 69
Top = 306
Top = 317
Width = 216
Anchors = [akRight, akBottom]
AutoFill = True
@ -105,7 +105,7 @@ object PropertiesForm: TPropertiesForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 51
ClientHeight = 50
ClientWidth = 212
ItemIndex = 0
Items.Strings = (

View File

@ -1,11 +1,11 @@
object SpeedForm: TSpeedForm
Left = 561
Height = 577
Top = 227
Left = 373
Height = 528
Top = 249
Width = 566
ActiveControl = VST1
Caption = 'SpeedForm'
ClientHeight = 577
ClientHeight = 528
ClientWidth = 566
Font.Height = -13
Font.Name = 'MS Sans Serif'
@ -13,48 +13,53 @@ object SpeedForm: TSpeedForm
Visible = True
object Label1: TLabel
Left = 7
Height = 17
Height = 18
Top = 8
Width = 140
Width = 156
Caption = 'Last operation duration:'
ParentColor = False
end
object Label3: TLabel
Left = 7
Height = 17
Top = 523
Width = 94
Left = 6
Height = 18
Top = 508
Width = 104
Anchors = [akLeft, akBottom]
Caption = 'Nodes in tree: 0'
ParentColor = False
end
object Label6: TLabel
Left = 164
Height = 17
Top = 523
Width = 68
Height = 18
Top = 508
Width = 73
Anchors = [akLeft, akBottom]
Caption = 'Selected: 0'
ParentColor = False
end
object Label4: TLabel
Left = 264
Height = 81
AnchorSideLeft.Control = VST1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = VST1
Left = 261
Height = 102
Top = 24
Width = 285
Anchors = [akTop, akRight]
Width = 296
BorderSpacing.Left = 4
Caption = 'Test how fast the Virtual Treeview is. You can add and delete nodes as much as you like (provided your system has enough memory). An upper limit of one million nodes for a 128MB system is a good start.'
ParentColor = False
WordWrap = True
end
object Label2: TLabel
AnchorSideLeft.Control = VST1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label4
AnchorSideTop.Side = asrBottom
Left = 262
Height = 17
Top = 115
Width = 122
Anchors = [akTop, akRight]
Left = 261
Height = 18
Top = 136
Width = 135
BorderSpacing.Left = 4
BorderSpacing.Top = 10
Caption = 'As an orientation:'
Font.Height = -13
@ -64,26 +69,30 @@ object SpeedForm: TSpeedForm
ParentFont = False
end
object Label5: TLabel
AnchorSideLeft.Control = VST1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
Left = 276
Height = 33
Top = 134
Width = 273
Anchors = [akTop, akRight]
Left = 265
Height = 60
Top = 156
Width = 292
BorderSpacing.Left = 8
BorderSpacing.Top = 2
Caption = '1.000.000 nodes on Windows XP Pro, 650Mhz Athlon, 256 MB RAM, take ~ 850ms to add.'
ParentColor = False
WordWrap = True
end
object Label7: TLabel
AnchorSideLeft.Control = VST1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label5
AnchorSideTop.Side = asrBottom
Left = 276
Height = 33
Top = 169
Width = 273
Anchors = [akTop, akRight]
Left = 265
Height = 39
Top = 218
Width = 292
BorderSpacing.Left = 8
BorderSpacing.Top = 2
Caption = '5.000.000 nodes on Windows XP Pro, 1.8Ghz Pentium M , 1 GB RAM, are added in ~1.6s.'
ParentColor = False
@ -91,7 +100,7 @@ object SpeedForm: TSpeedForm
end
object VST1: TVirtualStringTree
Left = 6
Height = 487
Height = 479
Top = 24
Width = 251
Anchors = [akTop, akLeft, akRight, akBottom]
@ -1563,7 +1572,7 @@ object SpeedForm: TSpeedForm
ShowHint = True
TabOrder = 0
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoTristateTracking]
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
TreeOptions.MiscOptions = [toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
TreeOptions.SelectionOptions = [toMultiSelect]
OnChange = VST1Change
OnGetText = VST1GetText
@ -1575,19 +1584,19 @@ object SpeedForm: TSpeedForm
AnchorSideBottom.Side = asrBottom
Left = 268
Height = 57
Top = 454
Top = 446
Width = 281
Anchors = [akRight, akBottom]
Caption = ' Background '
ClientHeight = 39
ClientHeight = 38
ClientWidth = 277
DragMode = dmAutomatic
TabOrder = 1
object SBCheckBox: TCheckBox
Left = 24
Height = 20
Height = 22
Top = 10
Width = 129
Width = 140
Caption = 'Show Background'
OnClick = SBCheckBoxClick
TabOrder = 0
@ -1608,12 +1617,12 @@ object SpeedForm: TSpeedForm
AnchorSideBottom.Control = GroupBox2
Left = 268
Height = 122
Top = 322
Top = 314
Width = 281
Anchors = [akRight, akBottom]
BorderSpacing.Bottom = 10
Caption = ' Add and remove nodes '
ClientHeight = 104
ClientHeight = 103
ClientWidth = 277
TabOrder = 2
object AddRootButton: TButton
@ -1628,7 +1637,7 @@ object SpeedForm: TSpeedForm
end
object NodeCountEdit: TEdit
Left = 12
Height = 24
Height = 27
Top = 16
Width = 81
TabOrder = 1

View File

@ -1,23 +1,23 @@
object VisibilityForm: TVisibilityForm
Left = 518
Height = 529
Top = 362
Width = 752
Left = 386
Height = 536
Top = 210
Width = 809
ActiveControl = VST1
Caption = 'VisibilityForm'
ClientHeight = 529
ClientWidth = 752
ClientHeight = 536
ClientWidth = 809
Font.Height = -13
Font.Name = 'MS Sans Serif'
OnCreate = FormCreate
OnHide = FormHide
OnShow = FormShow
LCLVersion = '0.9.27'
LCLVersion = '0.9.29'
object Label17: TLabel
Left = 369
Left = 368
Height = 77
Top = 4
Width = 196
Width = 240
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'This tree shows the effects of hiding and showing treenodes without actually deleting and recreating them or rebuild of the entire tree.'
@ -26,31 +26,32 @@ object VisibilityForm: TVisibilityForm
end
object Label1: TLabel
Left = 504
Height = 97
Height = 102
Top = 212
Width = 226
Width = 296
Anchors = [akTop, akRight]
AutoSize = False
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.'
ParentColor = False
WordWrap = True
end
object Label2: TLabel
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
Left = 504
Height = 93
Top = 324
Width = 226
Height = 102
Top = 322
Width = 296
Anchors = [akTop, akRight]
AutoSize = False
BorderSpacing.Top = 8
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.'
ParentColor = False
WordWrap = True
end
object Label3: TLabel
Left = 577
Left = 616
Height = 77
Top = 4
Width = 161
Width = 184
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'Hint: you can hide some nodes, select some remaining and reshow the others to see the effect better.'
@ -58,18 +59,20 @@ object VisibilityForm: TVisibilityForm
WordWrap = True
end
object Label4: TLabel
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
Left = 504
Height = 35
Top = 438
Width = 217
Height = 39
Top = 432
Width = 296
Anchors = [akTop, akRight]
AutoSize = False
BorderSpacing.Top = 8
Caption = ' Expand the trees first (Ctrl Shift +, for full expand) see the full effect.'
ParentColor = False
WordWrap = True
end
object RadioGroup1: TRadioGroup
Left = 369
Left = 368
Height = 109
Top = 88
Width = 369
@ -84,7 +87,7 @@ object VisibilityForm: TVisibilityForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 91
ClientHeight = 90
ClientWidth = 365
ItemIndex = 0
Items.Strings = (
@ -98,17 +101,17 @@ object VisibilityForm: TVisibilityForm
end
object Panel2: TPanel
Left = 4
Height = 266
Height = 322
Top = 212
Width = 489
Width = 492
Anchors = [akTop, akLeft, akRight, akBottom]
ClientHeight = 266
ClientWidth = 489
ClientHeight = 322
ClientWidth = 492
FullRepaint = False
TabOrder = 1
object Splitter2: TSplitter
Left = 205
Height = 264
Height = 320
Top = 1
Width = 2
AutoSnap = False
@ -116,7 +119,7 @@ object VisibilityForm: TVisibilityForm
end
object VST2: TVirtualStringTree
Left = 1
Height = 264
Height = 320
Top = 1
Width = 204
Align = alLeft
@ -4129,11 +4132,14 @@ object VisibilityForm: TVisibilityForm
Font.Color = clNavy
Font.Height = -11
Font.Name = 'Verdana'
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'Main column'
Width = 204
Width = 202
end>
Header.DefaultHeight = 17
Header.Font.Color = clNavy
Header.Font.Height = -13
Header.Font.Name = 'Verdana'
@ -4165,9 +4171,9 @@ object VisibilityForm: TVisibilityForm
end
object VST3: TVirtualStringTree
Left = 207
Height = 264
Height = 320
Top = 1
Width = 281
Width = 284
Align = alClient
Background.Data = {
07544269746D617066F30100424D66F30100000000003600000028000000D900
@ -8177,7 +8183,9 @@ object VisibilityForm: TVisibilityForm
Font.Color = clNavy
Font.Height = -11
Font.Name = 'Verdana'
Header.AutoSizeIndex = 0
Header.Columns = <>
Header.DefaultHeight = 17
Header.Font.Color = clNavy
Header.Font.Height = -13
Header.Font.Name = 'Verdana'
@ -8212,14 +8220,15 @@ object VisibilityForm: TVisibilityForm
Left = 4
Height = 193
Top = 4
Width = 354
Width = 356
Anchors = [akTop, akLeft, akRight]
BorderStyle = bsSingle
Colors.BorderColor = clWindowText
Colors.HotColor = clBlack
DefaultNodeHeight = 24
DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = <>
Header.DefaultHeight = 17
Header.Font.Height = -11
Header.Font.Name = 'MS Sans Serif'
Header.MainColumn = -1

View File

@ -2,46 +2,43 @@ object WindowsXPForm: TWindowsXPForm
Left = 376
Height = 449
Top = 327
Width = 839
Width = 844
ActiveControl = XPTree
Caption = 'WindowsXPForm'
ClientHeight = 449
ClientWidth = 839
ClientWidth = 844
Font.CharSet = ANSI_CHARSET
Font.Height = -13
Font.Name = 'Microsoft Sans Serif'
OnCreate = FormCreate
LCLVersion = '0.9.29'
object Label1: TLabel
Left = 575
Height = 80
Top = 56
Width = 244
Left = 565
Height = 123
Top = 40
Width = 272
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'This demo shows a tree with properties which make it look as in the new Windows XP style. Under Windows XP native theme APIs are used to paint the tree. On other system legacy code is used which simulates the look.'
ParentColor = False
WordWrap = True
end
object Label2: TLabel
Left = 576
Height = 97
Top = 144
Width = 243
Left = 565
Height = 123
Top = 168
Width = 272
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'Note that the scrollbars are not drawn in the new style on non-XP systems. It would be far off the goal of the tree to reimplement a full blown scrollbar handling, which would be required otherwise.'
ParentColor = False
WordWrap = True
end
object Label4: TLabel
Cursor = crHandPoint
Left = 576
Height = 136
Top = 256
Width = 243
Left = 565
Height = 144
Top = 290
Width = 272
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'If you want to have an explorer treeview with real content then I recommend that you give Jim Kuenemann''s shell tools a try. His shell treeview (based on Virtual Treeview) is the most advanced you will find worldwide. Click here to open Yahoo Group.'
Font.CharSet = ANSI_CHARSET
Font.Color = clBlue
@ -57,7 +54,8 @@ object WindowsXPForm: TWindowsXPForm
Left = 0
Height = 408
Top = 40
Width = 554
Width = 559
Anchors = [akTop, akLeft, akRight]
AutoScrollDelay = 500
ButtonFillMode = fmShaded
CheckImageKind = ckXP
@ -112,7 +110,7 @@ object WindowsXPForm: TWindowsXPForm
TreeOptions.AnimationOptions = [toAnimatedToggle]
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking]
TreeOptions.MiscOptions = [toCheckSupport, toInitOnSave, toReportMode, toToggleOnDblClick, toWheelPanning]
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toShowRoot, toThemeAware]
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toShowRoot]
TreeOptions.SelectionOptions = [toMultiSelect]
OnCompareNodes = XPTreeCompareNodes
OnGetText = XPTreeGetText
@ -127,7 +125,7 @@ object WindowsXPForm: TWindowsXPForm
Left = 0
Height = 34
Top = 0
Width = 839
Width = 844
ButtonHeight = 32
ButtonWidth = 32
Caption = 'ToolBar2'

View File

@ -123,6 +123,11 @@ procedure TWindowsXPForm.FormCreate(Sender: TObject);
begin
XPTree.NodeDataSize := SizeOf(TEntry);
{$ifdef LCLWin32}
//enable native look under win32
//todo: enable only in winxp
XPTree.TreeOptions.PaintOptions := XPTree.TreeOptions.PaintOptions + [toThemeAware];
{$endif}
end;
//----------------------------------------------------------------------------------------------------------------------