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

View File

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

View File

@ -1,7 +1,6 @@
unit DrawTreeDemo; unit DrawTreeDemo;
{$MODE Delphi} {$MODE Delphi}
{$H+}
// Virtual Treeview sample form demonstrating following features: // Virtual Treeview sample form demonstrating following features:
// - General use of TVirtualDrawTree. // - General use of TVirtualDrawTree.
@ -15,16 +14,6 @@ unit DrawTreeDemo;
// Otherwise disable the conditional symbol to compile this demo. // 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 interface
uses uses

View File

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

View File

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

View File

@ -14,11 +14,10 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
LCLVersion = '0.9.29' LCLVersion = '0.9.29'
object Label8: TLabel object Label8: TLabel
Left = 12 Left = 12
Height = 83 Height = 102
Top = 318 Top = 320
Width = 745 Width = 745
Anchors = [akLeft, akRight, akBottom] 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.' 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.Height = -13
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'

View File

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

View File

@ -3,21 +3,20 @@ object NodeForm: TNodeForm
Height = 542 Height = 542
Top = 332 Top = 332
Width = 773 Width = 773
ActiveControl = MLTree ActiveControl = Panel1
Caption = 'NodeForm' Caption = 'NodeForm'
ClientHeight = 542 ClientHeight = 542
ClientWidth = 773 ClientWidth = 773
Font.Height = -13 Font.Height = -13
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '0.9.27' LCLVersion = '0.9.29'
object Label8: TLabel object Label8: TLabel
Left = 12 Left = 12
Height = 72 Height = 102
Top = 429 Top = 424
Width = 732 Width = 732
Anchors = [akLeft, akRight, akBottom] 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).' 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 ParentColor = False
ShowAccelChar = False ShowAccelChar = False
@ -52,13 +51,16 @@ object NodeForm: TNodeForm
Colors.SelectionRectangleBlendColor = 10539203 Colors.SelectionRectangleBlendColor = 10539203
DefaultNodeHeight = 130 DefaultNodeHeight = 130
DefaultText = 'Node' DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = < Header.Columns = <
item item
Position = 1 Position = 1
Width = 483 Width = 495
end end
item item
Position = 0
end> end>
Header.DefaultHeight = 17
Header.Font.Height = -11 Header.Font.Height = -11
Header.Font.Name = 'MS Sans Serif' Header.Font.Name = 'MS Sans Serif'
Header.Options = [hoAutoResize, hoColumnResize, hoDrag] Header.Options = [hoAutoResize, hoColumnResize, hoDrag]
@ -86,9 +88,9 @@ object NodeForm: TNodeForm
end end
object AutoAdjustCheckBox: TCheckBox object AutoAdjustCheckBox: TCheckBox
Left = 12 Left = 12
Height = 20 Height = 22
Top = 401 Top = 399
Width = 286 Width = 327
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
Caption = 'Automatically adjust node height to node text.' Caption = 'Automatically adjust node height to node text.'
OnClick = AutoAdjustCheckBoxClick OnClick = AutoAdjustCheckBoxClick

View File

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

View File

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

View File

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

View File

@ -2,46 +2,43 @@ object WindowsXPForm: TWindowsXPForm
Left = 376 Left = 376
Height = 449 Height = 449
Top = 327 Top = 327
Width = 839 Width = 844
ActiveControl = XPTree ActiveControl = XPTree
Caption = 'WindowsXPForm' Caption = 'WindowsXPForm'
ClientHeight = 449 ClientHeight = 449
ClientWidth = 839 ClientWidth = 844
Font.CharSet = ANSI_CHARSET Font.CharSet = ANSI_CHARSET
Font.Height = -13 Font.Height = -13
Font.Name = 'Microsoft Sans Serif' Font.Name = 'Microsoft Sans Serif'
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '0.9.29' LCLVersion = '0.9.29'
object Label1: TLabel object Label1: TLabel
Left = 575 Left = 565
Height = 80 Height = 123
Top = 56 Top = 40
Width = 244 Width = 272
Anchors = [akTop, akRight] 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.' 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 ParentColor = False
WordWrap = True WordWrap = True
end end
object Label2: TLabel object Label2: TLabel
Left = 576 Left = 565
Height = 97 Height = 123
Top = 144 Top = 168
Width = 243 Width = 272
Anchors = [akTop, akRight] 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.' 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 ParentColor = False
WordWrap = True WordWrap = True
end end
object Label4: TLabel object Label4: TLabel
Cursor = crHandPoint Cursor = crHandPoint
Left = 576 Left = 565
Height = 136 Height = 144
Top = 256 Top = 290
Width = 243 Width = 272
Anchors = [akTop, akRight] 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.' 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.CharSet = ANSI_CHARSET
Font.Color = clBlue Font.Color = clBlue
@ -57,7 +54,8 @@ object WindowsXPForm: TWindowsXPForm
Left = 0 Left = 0
Height = 408 Height = 408
Top = 40 Top = 40
Width = 554 Width = 559
Anchors = [akTop, akLeft, akRight]
AutoScrollDelay = 500 AutoScrollDelay = 500
ButtonFillMode = fmShaded ButtonFillMode = fmShaded
CheckImageKind = ckXP CheckImageKind = ckXP
@ -112,7 +110,7 @@ object WindowsXPForm: TWindowsXPForm
TreeOptions.AnimationOptions = [toAnimatedToggle] TreeOptions.AnimationOptions = [toAnimatedToggle]
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking] TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking]
TreeOptions.MiscOptions = [toCheckSupport, toInitOnSave, toReportMode, toToggleOnDblClick, toWheelPanning] TreeOptions.MiscOptions = [toCheckSupport, toInitOnSave, toReportMode, toToggleOnDblClick, toWheelPanning]
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toShowRoot, toThemeAware] TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toShowRoot]
TreeOptions.SelectionOptions = [toMultiSelect] TreeOptions.SelectionOptions = [toMultiSelect]
OnCompareNodes = XPTreeCompareNodes OnCompareNodes = XPTreeCompareNodes
OnGetText = XPTreeGetText OnGetText = XPTreeGetText
@ -127,7 +125,7 @@ object WindowsXPForm: TWindowsXPForm
Left = 0 Left = 0
Height = 34 Height = 34
Top = 0 Top = 0
Width = 839 Width = 844
ButtonHeight = 32 ButtonHeight = 32
ButtonWidth = 32 ButtonWidth = 32
Caption = 'ToolBar2' Caption = 'ToolBar2'

View File

@ -123,6 +123,11 @@ procedure TWindowsXPForm.FormCreate(Sender: TObject);
begin begin
XPTree.NodeDataSize := SizeOf(TEntry); 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; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------