From 051462922270b7a97ed624240feebbb5a0c8e6ff Mon Sep 17 00:00:00 2001 From: blikblum Date: Wed, 16 Dec 2009 22:50:04 +0000 Subject: [PATCH] * Advanced demos: - cleanup, set anchors for Speed, GeneralAbilities and Properties demos. - Set forms BorderStyle to bsNone git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1070 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../trunk/demos/advanced/AlignDemo.lfm | 8 +- .../demos/advanced/GeneralAbilitiesDemo.lfm | 83 ++++++++++++------- .../demos/advanced/GeneralAbilitiesDemo.pas | 15 +--- .../trunk/demos/advanced/Main.lfm | 34 ++++++-- .../trunk/demos/advanced/Main.pas | 21 +---- .../trunk/demos/advanced/PropertiesDemo.lfm | 34 ++++---- .../trunk/demos/advanced/PropertiesDemo.pas | 23 ++--- .../trunk/demos/advanced/SpeedDemo.lfm | 45 ++++++---- .../trunk/demos/advanced/SpeedDemo.pas | 3 +- 9 files changed, 140 insertions(+), 126 deletions(-) diff --git a/components/virtualtreeview-new/trunk/demos/advanced/AlignDemo.lfm b/components/virtualtreeview-new/trunk/demos/advanced/AlignDemo.lfm index 0601b8d9d..3cf5fccc5 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/AlignDemo.lfm +++ b/components/virtualtreeview-new/trunk/demos/advanced/AlignDemo.lfm @@ -12,7 +12,7 @@ object AlignForm: TAlignForm Font.Name = 'Arial' OnCreate = FormCreate OnDestroy = FormDestroy - LCLVersion = '0.9.27' + LCLVersion = '0.9.29' object Label8: TLabel Left = 8 Height = 111 @@ -77,7 +77,6 @@ object AlignForm: TAlignForm Top = 2 Width = 554 Anchors = [akTop, akLeft, akRight, akBottom] - BorderStyle = bsSingle CheckImageKind = ckDarkTick ClipboardFormats.Strings = ( 'CSV' @@ -96,6 +95,7 @@ object AlignForm: TAlignForm DefaultNodeHeight = 34 DefaultText = 'Node' EditDelay = 100 + Header.AutoSizeIndex = 0 Header.Background = clBtnShadow Header.Columns = < item @@ -103,6 +103,7 @@ object AlignForm: TAlignForm Hint = 'Text is initially centered and has a left-to-right directionality.' ImageIndex = 20 Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible, coAutoSpring] + Position = 0 Spacing = 10 Text = 'English text column' Width = 185 @@ -110,7 +111,7 @@ object AlignForm: TAlignForm item Hint = 'Text is initially left aligned and has a left-to-right directionality.' ImageIndex = 35 - Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible, coAutoSpring] + Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible, coAutoSpring, coWrapCaption] Position = 1 Spacing = 10 Text = 'Greek text column' @@ -126,6 +127,7 @@ object AlignForm: TAlignForm Text = 'Hebrew/arabic text column' Width = 209 end> + Header.DefaultHeight = 17 Header.Font.Height = -12 Header.Font.Name = 'Arial' Header.Font.Style = [fsBold] diff --git a/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.lfm b/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.lfm index b3f124792..1de612873 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.lfm +++ b/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.lfm @@ -14,30 +14,35 @@ object GeneralForm: TGeneralForm ShowHint = True LCLVersion = '0.9.29' object Label18: TLabel - Left = 502 + AnchorSideTop.Control = RadioGroup2 + AnchorSideTop.Side = asrBottom + Left = 499 Height = 14 - Top = 384 + Top = 374 Width = 105 - Anchors = [akRight, akBottom] + Anchors = [akTop, akRight] + BorderSpacing.Top = 20 Caption = 'Switch check images:' ParentColor = False end object Label19: TLabel - Left = 506 + AnchorSideTop.Control = CheckMarkCombo + AnchorSideTop.Side = asrBottom + Left = 499 Height = 14 - Top = 432 + Top = 431 Width = 98 - Anchors = [akRight, akBottom] + Anchors = [akTop, akRight] + BorderSpacing.Top = 20 Caption = 'Switch main column:' ParentColor = False end object Label8: TLabel - Left = 502 - Height = 77 + Left = 499 + Height = 53 Top = 40 Width = 206 Anchors = [akTop, akRight] - AutoSize = False 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 @@ -49,7 +54,6 @@ object GeneralForm: TGeneralForm Width = 474 Anchors = [akTop, akLeft, akRight, akBottom] AutoExpandDelay = 300 - BorderStyle = bsSingle ButtonFillMode = fmWindowColor CheckImageKind = ckDarkTick ClipboardFormats.Strings = ( @@ -130,11 +134,14 @@ object GeneralForm: TGeneralForm OnStateChange = VST2StateChange end object CheckMarkCombo: TComboBox - Left = 503 + AnchorSideTop.Control = Label18 + AnchorSideTop.Side = asrBottom + Left = 499 Height = 21 - Top = 401 - Width = 200 - Anchors = [akRight, akBottom] + Top = 390 + Width = 205 + Anchors = [akTop, akRight] + BorderSpacing.Top = 2 ItemHeight = 13 Items.Strings = ( 'Light check marks' @@ -144,8 +151,8 @@ object GeneralForm: TGeneralForm 'Flat tick marks' 'Windows XP style images' 'Custom check images' - 'System check images' 'System flat check images' + 'System default check images' ) OnChange = CheckMarkComboChange PopupMenu = PopupMenu1 @@ -153,11 +160,14 @@ object GeneralForm: TGeneralForm TabOrder = 1 end object MainColumnUpDown: TUpDown - Left = 507 + AnchorSideTop.Control = Label19 + AnchorSideTop.Side = asrBottom + Left = 499 Height = 16 - Top = 455 + Top = 447 Width = 37 - Anchors = [akRight, akBottom] + Anchors = [akTop, akRight] + BorderSpacing.Top = 2 Min = 0 Max = 2 Increment = 2 @@ -168,10 +178,10 @@ object GeneralForm: TGeneralForm OnChanging = MainColumnUpDownChanging end object BitBtn1: TBitBtn - Left = 504 + Left = 499 Height = 30 Hint = 'Pick a font to be used by this tree.' - Top = 6 + Top = 8 Width = 91 Anchors = [akTop, akRight] Caption = 'Tree font' @@ -195,12 +205,15 @@ object GeneralForm: TGeneralForm TabOrder = 3 end object RadioGroup1: TRadioGroup - Left = 501 + AnchorSideTop.Control = ThemeRadioGroup + AnchorSideTop.Side = asrBottom + Left = 499 Height = 77 - Top = 209 + Top = 190 Width = 205 - Anchors = [akRight, akBottom] + Anchors = [akTop, akRight] AutoFill = True + BorderSpacing.Top = 10 Caption = 'Tree button look: ' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -221,12 +234,15 @@ object GeneralForm: TGeneralForm TabOrder = 4 end object RadioGroup2: TRadioGroup - Left = 501 + AnchorSideTop.Control = RadioGroup1 + AnchorSideTop.Side = asrBottom + Left = 499 Height = 77 - Top = 297 + Top = 277 Width = 205 - Anchors = [akRight, akBottom] + Anchors = [akTop, akRight] AutoFill = True + BorderSpacing.Top = 10 Caption = 'Draw selection mode: ' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -247,12 +263,17 @@ object GeneralForm: TGeneralForm TabOrder = 5 end object ThemeRadioGroup: TRadioGroup - Left = 501 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Label8 + AnchorSideTop.Side = asrBottom + Left = 499 Height = 77 - Top = 125 + Top = 103 Width = 205 - Anchors = [akRight, akBottom] + Anchors = [akTop, akRight] AutoFill = True + BorderSpacing.Left = 10 + BorderSpacing.Top = 10 Caption = ' Switch XP theme awareness: ' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -272,9 +293,9 @@ object GeneralForm: TGeneralForm TabOrder = 6 end object SaveButton: TBitBtn - Left = 611 + Left = 613 Height = 30 - Top = 6 + Top = 8 Width = 91 Anchors = [akTop, akRight] Caption = 'Save as text...' diff --git a/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.pas b/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.pas index 8fa940863..f22287bc1 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.pas +++ b/components/virtualtreeview-new/trunk/demos/advanced/GeneralAbilitiesDemo.pas @@ -2,7 +2,6 @@ unit GeneralAbilitiesDemo; {$MODE Delphi} - // Virtual Treeview sample form demonstrating following features: // - General use and feel of TVirtualStringTree. // - Themed/non-themed painting. @@ -19,14 +18,6 @@ unit GeneralAbilitiesDemo; interface - -{$ifdef COMPILER_7_UP} - // For some things to work we need code, which is classified as being unsafe for .NET. - {$warn UNSAFE_TYPE off} - {$warn UNSAFE_CAST off} - {$warn UNSAFE_CODE off} -{$endif COMPILER_7_UP} - uses LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, VTHeaderPopup, VirtualTrees, ComCtrls, ExtCtrls, Menus, @@ -95,9 +86,7 @@ var implementation uses - {$ifdef Windows} - ShellAPI, - {$endif} Main, States; + Main, States; //---------------------------------------------------------------------------------------------------------------------- @@ -124,7 +113,7 @@ var begin // Determine if we are running on Windows XP. - {$ifdef Windows} + {$ifdef LCLWin32} ThemeRadioGroup.Enabled := (Win32MajorVersion >= 5) and (Win32MinorVersion >= 1); {$else} ThemeRadioGroup.Enabled := False; diff --git a/components/virtualtreeview-new/trunk/demos/advanced/Main.lfm b/components/virtualtreeview-new/trunk/demos/advanced/Main.lfm index 1607f071f..0edd3cd39 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/Main.lfm +++ b/components/virtualtreeview-new/trunk/demos/advanced/Main.lfm @@ -13,9 +13,11 @@ object MainForm: TMainForm OnCreate = FormCreate OnShow = FormShow Position = poScreenCenter - LCLVersion = '0.9.25' + LCLVersion = '0.9.29' object PageScroller1: TPanel + Left = 0 Height = 77 + Top = 0 Width = 980 Align = alTop ClientHeight = 77 @@ -26,7 +28,9 @@ object MainForm: TMainForm ShowHint = True TabOrder = 0 object MainPanel: TPanel + Left = 0 Height = 70 + Top = 0 Width = 976 AutoSize = True BevelOuter = bvNone @@ -39,6 +43,7 @@ object MainForm: TMainForm Left = 216 Height = 70 Hint = 'The speed breakthrough' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -158,6 +163,7 @@ object MainForm: TMainForm Left = 285 Height = 70 Hint = 'General abilities and features' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -277,6 +283,7 @@ object MainForm: TMainForm Left = 354 Height = 70 Hint = 'Property tree simulation' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -452,6 +459,7 @@ object MainForm: TMainForm Left = 423 Height = 70 Hint = 'Hide and show nodes, sync two trees' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -571,6 +579,7 @@ object MainForm: TMainForm Left = 492 Height = 70 Hint = 'Tree in grid simulation' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -690,6 +699,7 @@ object MainForm: TMainForm Left = 561 Height = 70 Hint = 'A paint tree as directory tree' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -809,6 +819,7 @@ object MainForm: TMainForm Left = 630 Height = 70 Hint = 'Alignment, directionality and internationalization' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -980,19 +991,22 @@ object MainForm: TMainForm OnClick = DemoButtonClick end object Label1: TLabel - Height = 17 + Left = 0 + Height = 14 Top = 26 - Width = 92 + Width = 73 Caption = 'Demo picker' Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [fsBold] ParentColor = False + ParentFont = False end object Label2: TLabel + Left = 0 Height = 17 Top = 42 - Width = 244 + Width = 197 Caption = 'Which demo do you want to see?' ParentColor = False end @@ -1001,6 +1015,7 @@ object MainForm: TMainForm Left = 699 Height = 70 Hint = 'Painting like in Windows XP' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -1232,6 +1247,7 @@ object MainForm: TMainForm Left = 768 Height = 70 Hint = 'Multiline nodes' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -1562,6 +1578,7 @@ object MainForm: TMainForm Left = 837 Height = 70 Hint = 'Custom header drawing in advanced mode' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -1825,6 +1842,7 @@ object MainForm: TMainForm Left = 906 Height = 70 Hint = 'Exit' + Top = 0 Width = 70 Color = clBtnFace Glyph.Data = { @@ -1942,13 +1960,15 @@ object MainForm: TMainForm end end object StatusBar: TStatusBar - Height = 24 - Top = 542 + Left = 0 + Height = 20 + Top = 546 Width = 980 Panels = <> end object ContainerPanel: TPanel - Height = 465 + Left = 0 + Height = 469 Top = 77 Width = 980 Align = alClient diff --git a/components/virtualtreeview-new/trunk/demos/advanced/Main.pas b/components/virtualtreeview-new/trunk/demos/advanced/Main.pas index bba8a0e58..eca2fd429 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/Main.pas +++ b/components/virtualtreeview-new/trunk/demos/advanced/Main.pas @@ -1,7 +1,6 @@ unit Main; {$MODE Delphi} -{$H+} // Advanced demo for Virtual Treeview showing various effects and features in several forms. // This is the main form which serves as container window for the demo forms. @@ -9,12 +8,6 @@ unit Main; interface -{$ifdef COMPILER_7_UP} - // For some things to work we need code, which is classified as being unsafe for .NET. - {$warn UNSAFE_TYPE off} - {$warn UNSAFE_CAST off} - {$warn UNSAFE_CODE off} -{$endif COMPILER_7_UP} uses LCLIntf, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, @@ -48,7 +41,7 @@ type var MainForm: TMainForm; -procedure LoadUnicodeStrings(Name: string; var Strings: array of UTF8String); +procedure LoadUnicodeStrings(const Name: string; var Strings: array of UTF8String); procedure SetStatusbarText(const S: string); //---------------------------------------------------------------------------------------------------------------------- @@ -63,7 +56,7 @@ uses //---------------------------------------------------------------------------------------------------------------------- -procedure LoadUnicodeStrings(Name: string; var Strings: array of UTF8String); +procedure LoadUnicodeStrings(const Name: string; var Strings: array of UTF8String); // Loads the Unicode strings from the resource. @@ -158,22 +151,12 @@ begin if Assigned(NewDemoClass) then begin - //original code: - { NewDemo := NewDemoClass.Create(Self); NewDemo.Hide; NewDemo.BorderStyle := bsNone; NewDemo.Parent := ContainerPanel; NewDemo.Align := alClient; NewDemo.Show; - } - //workaround - NewDemo := NewDemoClass.Create(Self); - NewDemo.Hide; - //NewDemo.BorderStyle := bsNone; - NewDemo.Align := alClient; - NewDemo.Show; - NewDemo.Parent := ContainerPanel; end; end; end; diff --git a/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.lfm b/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.lfm index 42b0fb460..0341721aa 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.lfm +++ b/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.lfm @@ -10,26 +10,27 @@ object PropertiesForm: TPropertiesForm Font.Height = -13 Font.Name = 'MS Sans Serif' OnCreate = FormCreate - LCLVersion = '0.9.27' + LCLVersion = '0.9.29' object Label9: TLabel Left = 420 - Height = 81 - Top = 12 - Width = 198 + Height = 65 + Top = 6 + Width = 212 Anchors = [akTop, akRight] - AutoSize = False Caption = 'This tree demonstrates a typical property page as it can be found in the property dialog for Word and other documents.' ParentColor = False WordWrap = True end object Label10: TLabel + AnchorSideTop.Control = Label9 + AnchorSideTop.Side = asrBottom Left = 420 - Height = 93 - Top = 100 - Width = 198 + Height = 49 + Top = 81 + Width = 212 Anchors = [akTop, akRight] - AutoSize = False - Caption = 'What makes this demonstration special is the sample implementation for node editors. However, neither of them is Unicode aware.' + BorderSpacing.Top = 10 + Caption = 'What makes this demonstration special is the sample implementation for node editors.' ParentColor = False WordWrap = True end @@ -39,7 +40,6 @@ object PropertiesForm: TPropertiesForm Top = 6 Width = 399 Anchors = [akTop, akLeft, akRight, akBottom] - BorderStyle = bsSingle Colors.BorderColor = clWindowText Colors.HotColor = clBlack DefaultNodeHeight = 20 @@ -48,6 +48,7 @@ object PropertiesForm: TPropertiesForm Header.Columns = < item Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAutoSpring] + Position = 0 Text = 'Properties' Width = 203 end @@ -55,8 +56,9 @@ object PropertiesForm: TPropertiesForm Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAutoSpring] Position = 1 Text = 'Values' - Width = 196 + Width = 192 end> + Header.DefaultHeight = 17 Header.Font.Height = -11 Header.Font.Name = 'MS Sans Serif' Header.Height = 18 @@ -91,7 +93,7 @@ object PropertiesForm: TPropertiesForm Left = 416 Height = 69 Top = 306 - Width = 202 + Width = 216 Anchors = [akRight, akBottom] AutoFill = True Caption = ' Incremental search direction: ' @@ -104,11 +106,11 @@ object PropertiesForm: TPropertiesForm ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 ClientHeight = 51 - ClientWidth = 198 + ClientWidth = 212 ItemIndex = 0 Items.Strings = ( - 'forward' - 'backward' + 'Forward' + 'Backward' ) OnClick = RadioGroup1Click TabOrder = 1 diff --git a/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.pas b/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.pas index 7e15dda61..f2354ea18 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.pas +++ b/components/virtualtreeview-new/trunk/demos/advanced/PropertiesDemo.pas @@ -1,7 +1,6 @@ unit PropertiesDemo; {$MODE Delphi} -{$H+} // Virtual Treeview sample form demonstrating following features: // - Property page like string tree with individual node editors. @@ -11,15 +10,13 @@ unit PropertiesDemo; interface uses - {$ifdef Windows} Messages, {$endif} LCLIntf, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, VirtualTrees, ExtCtrls, LResources; + StdCtrls, VirtualTrees, ExtCtrls, LResources, LMessages; -{$ifdef Windows} const // Helper message to decouple node change handling from edit handling. - WM_STARTEDITING = WM_USER + 778; -{$endif} + WM_STARTEDITING = LM_USER + 778; + type TPropertiesForm = class(TForm) VST3: TVirtualStringTree; @@ -47,9 +44,7 @@ type procedure RadioGroup1Click(Sender: TObject); procedure VST3StateChange(Sender: TBaseVirtualTree; Enter, Leave: TVirtualTreeStates); private - {$ifdef Windows} - procedure WMStartEditing(var Message: TMessage); message WM_STARTEDITING; - {$endif} + procedure WMStartEditing(var Message: TLMessage); message WM_STARTEDITING; end; var @@ -203,9 +198,7 @@ begin // to start a new edit operation if the last one is still in progress. So we post us a special message and // in the message handler we then can start editing the new node. This works because the posted message // is first executed *after* this event and the message, which triggered it is finished. - {$ifdef Windows} PostMessage(Self.Handle, WM_STARTEDITING, Integer(Node), 0); - {$endif} end; end; end; @@ -256,9 +249,6 @@ var PropText: string; begin - // Note: This code requires a proper Unicode/WideString comparation routine which I did not want to link here for - // size and clarity reasons. For now strings are (implicitely) converted to ANSI to make the comparation work. - // Search is not case sensitive. S := Text; SetStatusbarText('Searching for: ' + S); @@ -298,7 +288,6 @@ procedure TPropertiesForm.VST3StateChange(Sender: TBaseVirtualTree; Enter, Leave begin if tsIncrementalSearching in Enter then - // Note: Unicode will be converted to ANSI here, but for demonstration purposes we accept that for now. SetStatusbarText('Searching for: ' + Sender.SearchBuffer); if tsIncrementalSearching in Leave then SetStatusbarText(''); @@ -309,8 +298,7 @@ end; //---------------------------------------------------------------------------------------------------------------------- -{$ifdef Windows} -procedure TPropertiesForm.WMStartEditing(var Message: TMessage); +procedure TPropertiesForm.WMStartEditing(var Message: TLMessage); // This message was posted by ourselves from the node change handler above to decouple that change event and our // intention to start editing a node. This is necessary to avoid interferences between nodes editors potentially created @@ -324,7 +312,6 @@ begin // Note: the test whether a node can really be edited is done in the OnEditing event. VST3.EditNode(Node, 1); end; -{$endif} //---------------------------------------------------------------------------------------------------------------------- initialization diff --git a/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.lfm b/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.lfm index e3713ab2a..36d10d218 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.lfm +++ b/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.lfm @@ -9,7 +9,7 @@ object SpeedForm: TSpeedForm ClientWidth = 566 Font.Height = -13 Font.Name = 'MS Sans Serif' - LCLVersion = '0.9.27' + LCLVersion = '0.9.29' Visible = True object Label1: TLabel Left = 7 @@ -39,21 +39,23 @@ object SpeedForm: TSpeedForm end object Label4: TLabel Left = 264 - Height = 85 + Height = 81 Top = 24 Width = 285 Anchors = [akTop, akRight] - AutoSize = False 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 + AnchorSideTop.Control = Label4 + AnchorSideTop.Side = asrBottom Left = 262 Height = 17 - Top = 114 + Top = 115 Width = 122 Anchors = [akTop, akRight] + BorderSpacing.Top = 10 Caption = 'As an orientation:' Font.Height = -13 Font.Name = 'MS Sans Serif' @@ -62,23 +64,27 @@ object SpeedForm: TSpeedForm ParentFont = False end object Label5: TLabel + AnchorSideTop.Control = Label2 + AnchorSideTop.Side = asrBottom Left = 276 - Height = 41 - Top = 136 + Height = 33 + Top = 134 Width = 273 Anchors = [akTop, akRight] - AutoSize = False + 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 + AnchorSideTop.Control = Label5 + AnchorSideTop.Side = asrBottom Left = 276 - Height = 41 - Top = 176 - Width = 269 + Height = 33 + Top = 169 + Width = 273 Anchors = [akTop, akRight] - AutoSize = False + 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 WordWrap = True @@ -1541,12 +1547,12 @@ object SpeedForm: TSpeedForm 1410041410071410041410071410041410071400000000000404040004070004 10141014040C04140C070700040C040C0404141007040004071014040000 } - BorderStyle = bsSingle Colors.BorderColor = clWindowText Colors.HotColor = clBlack DefaultText = 'Node' Header.AutoSizeIndex = -1 Header.Columns = <> + Header.DefaultHeight = 17 Header.Font.Height = -11 Header.Font.Name = 'MS Sans Serif' Header.MainColumn = -1 @@ -1565,22 +1571,24 @@ object SpeedForm: TSpeedForm OnStructureChange = VST1StructureChange end object GroupBox2: TGroupBox + AnchorSideBottom.Control = VST1 + AnchorSideBottom.Side = asrBottom Left = 268 Height = 57 Top = 454 - Width = 272 + Width = 281 Anchors = [akRight, akBottom] Caption = ' Background ' ClientHeight = 39 - ClientWidth = 268 + ClientWidth = 277 DragMode = dmAutomatic TabOrder = 1 object SBCheckBox: TCheckBox Left = 24 Height = 20 Top = 10 - Width = 126 - Caption = 'show background' + Width = 129 + Caption = 'Show Background' OnClick = SBCheckBoxClick TabOrder = 0 end @@ -1596,11 +1604,14 @@ object SpeedForm: TSpeedForm end end object GroupBox1: TGroupBox + AnchorSideTop.Side = asrBottom + AnchorSideBottom.Control = GroupBox2 Left = 268 Height = 122 - Top = 316 + Top = 322 Width = 281 Anchors = [akRight, akBottom] + BorderSpacing.Bottom = 10 Caption = ' Add and remove nodes ' ClientHeight = 104 ClientWidth = 277 diff --git a/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.pas b/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.pas index d388a6479..3c7d5236c 100644 --- a/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.pas +++ b/components/virtualtreeview-new/trunk/demos/advanced/SpeedDemo.pas @@ -1,7 +1,6 @@ unit SpeedDemo; {$MODE Delphi} -{$H+} // Virtual Treeview sample form demonstrating following features: // - Speed. @@ -12,7 +11,7 @@ interface uses LCLIntf, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, VirtualTrees, ExtDlgs, ComCtrls, {jpeg,} Menus, LResources, Buttons; + StdCtrls, VirtualTrees, ExtDlgs, ComCtrls, Menus, LResources, Buttons; type TSpeedForm = class(TForm)