* Fix crash under gtk/gtk2/qt in advanced example

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@429 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2008-04-18 00:51:27 +00:00
parent f1a883be87
commit 7eba9e2d01
5 changed files with 3093 additions and 3690 deletions

View File

@ -53,7 +53,7 @@ var
implementation implementation
uses uses
States; States, LclExt;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -236,9 +236,9 @@ procedure THeaderOwnerDrawForm.FormCreate(Sender: TObject);
begin begin
FBackBitmap1 := TBitmap.Create; FBackBitmap1 := TBitmap.Create;
FBackBitmap1.PixelFormat := pf32Bit; FBackBitmap1.PixelFormat := OptimalPixelFormat;
FBackBitmap2 := TBitmap.Create; FBackBitmap2 := TBitmap.Create;
FBackBitmap2.PixelFormat := pf32Bit; FBackBitmap2.PixelFormat := OptimalPixelFormat;
CreateCheckerBackground; CreateCheckerBackground;
FHeaderBitmap := TBitmap.Create; FHeaderBitmap := TBitmap.Create;
FHeaderBitmap.LoadFromLazarusResource('Transcriptions'); FHeaderBitmap.LoadFromLazarusResource('Transcriptions');

View File

@ -1,51 +1,44 @@
object MainForm: TMainForm object MainForm: TMainForm
Left = 220 Left = 17
Height = 578 Height = 566
Top = 206 Top = 86
Width = 848 Width = 980
HorzScrollBar.Page = 847 HorzScrollBar.Page = 979
VertScrollBar.Page = 577 VertScrollBar.Page = 565
Caption = 'Virtual Treeview features demo' Caption = 'Virtual Treeview features demo'
ClientHeight = 578 ClientHeight = 566
ClientWidth = 848 ClientWidth = 980
Font.Height = -13 Font.Height = -13
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
object Bevel1: TBevel LCLVersion = '0.9.25'
Height = 2
Top = 77
Width = 848
Align = alTop
Shape = bsTopLine
end
object PageScroller1: TPanel object PageScroller1: TPanel
Height = 77 Height = 77
Width = 848 Width = 980
Align = alTop Align = alTop
ClientHeight = 77 ClientHeight = 77
ClientWidth = 848 ClientWidth = 980
Color = clWhite Color = clWhite
ParentColor = False ParentColor = False
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 0 TabOrder = 0
object MainPanel: TPanel object MainPanel: TPanel
Height = 74 Height = 70
Width = 990 Width = 976
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 74 ClientHeight = 70
ClientWidth = 990 ClientWidth = 976
Color = clWhite Color = clWhite
ParentColor = False ParentColor = False
TabOrder = 0 TabOrder = 0
object SpeedDemoButton: TSpeedButton object SpeedDemoButton: TSpeedButton
Left = 230 Left = 216
Height = 70 Height = 70
Hint = 'The speed breakthrough' Hint = 'The speed breakthrough'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -162,10 +155,9 @@ object MainForm: TMainForm
end end
object AbilitiesDemoButton: TSpeedButton object AbilitiesDemoButton: TSpeedButton
Tag = 1 Tag = 1
Left = 299 Left = 285
Height = 70 Height = 70
Hint = 'General abilities and features' Hint = 'General abilities and features'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -282,10 +274,9 @@ object MainForm: TMainForm
end end
object PropertiesDemoButton: TSpeedButton object PropertiesDemoButton: TSpeedButton
Tag = 2 Tag = 2
Left = 368 Left = 354
Height = 70 Height = 70
Hint = 'Property tree simulation' Hint = 'Property tree simulation'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -458,10 +449,9 @@ object MainForm: TMainForm
end end
object VisibilityDemoButton: TSpeedButton object VisibilityDemoButton: TSpeedButton
Tag = 3 Tag = 3
Left = 437 Left = 423
Height = 70 Height = 70
Hint = 'Hide and show nodes, sync two trees' Hint = 'Hide and show nodes, sync two trees'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -578,10 +568,9 @@ object MainForm: TMainForm
end end
object GridDemoButton: TSpeedButton object GridDemoButton: TSpeedButton
Tag = 5 Tag = 5
Left = 506 Left = 492
Height = 70 Height = 70
Hint = 'Tree in grid simulation' Hint = 'Tree in grid simulation'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -698,10 +687,9 @@ object MainForm: TMainForm
end end
object PaintTreeDemoButton: TSpeedButton object PaintTreeDemoButton: TSpeedButton
Tag = 6 Tag = 6
Left = 575 Left = 561
Height = 70 Height = 70
Hint = 'A paint tree as directory tree' Hint = 'A paint tree as directory tree'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -818,10 +806,9 @@ object MainForm: TMainForm
end end
object AlignDemoButton: TSpeedButton object AlignDemoButton: TSpeedButton
Tag = 7 Tag = 7
Left = 644 Left = 630
Height = 70 Height = 70
Hint = 'Alignment, directionality and internationalization' Hint = 'Alignment, directionality and internationalization'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -992,23 +979,10 @@ object MainForm: TMainForm
NumGlyphs = 0 NumGlyphs = 0
OnClick = DemoButtonClick OnClick = DemoButtonClick
end end
object Bevel2: TBevel
Left = 887
Height = 70
Top = 4
Width = 10
Style = bsRaised
end
object Bevel3: TBevel
Height = 70
Width = 10
Style = bsRaised
end
object Label1: TLabel object Label1: TLabel
Left = 14 Height = 17
Height = 14 Top = 26
Top = 28 Width = 92
Width = 73
Caption = 'Demo picker' Caption = 'Demo picker'
Font.Height = -11 Font.Height = -11
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
@ -1016,19 +990,17 @@ object MainForm: TMainForm
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel
Left = 22 Height = 17
Height = 14 Top = 42
Top = 44 Width = 244
Width = 160
Caption = 'Which demo do you want to see?' Caption = 'Which demo do you want to see?'
ParentColor = False ParentColor = False
end end
object SpeedButton1: TSpeedButton object SpeedButton1: TSpeedButton
Tag = 8 Tag = 8
Left = 713 Left = 699
Height = 70 Height = 70
Hint = 'Painting like in Windows XP' Hint = 'Painting like in Windows XP'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -1257,10 +1229,9 @@ object MainForm: TMainForm
end end
object XPDemoButton: TSpeedButton object XPDemoButton: TSpeedButton
Tag = 9 Tag = 9
Left = 782 Left = 768
Height = 70 Height = 70
Hint = 'Multiline nodes' Hint = 'Multiline nodes'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -1588,10 +1559,9 @@ object MainForm: TMainForm
end end
object QuitButton: TSpeedButton object QuitButton: TSpeedButton
Tag = -1 Tag = -1
Left = 920 Left = 906
Height = 70 Height = 70
Hint = 'Exit' Hint = 'Exit'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -1708,10 +1678,9 @@ object MainForm: TMainForm
end end
object SpeedButton2: TSpeedButton object SpeedButton2: TSpeedButton
Tag = 10 Tag = 10
Left = 851 Left = 837
Height = 70 Height = 70
Hint = 'Custom header drawing in advanced mode' Hint = 'Custom header drawing in advanced mode'
Top = 2
Width = 70 Width = 70
Color = clBtnFace Color = clBtnFace
Glyph.Data = { Glyph.Data = {
@ -1973,15 +1942,15 @@ object MainForm: TMainForm
end end
end end
object StatusBar: TStatusBar object StatusBar: TStatusBar
Height = 20 Height = 24
Top = 558 Top = 542
Width = 848 Width = 980
Panels = <> Panels = <>
end end
object ContainerPanel: TPanel object ContainerPanel: TPanel
Height = 479 Height = 465
Top = 79 Top = 77
Width = 848 Width = 980
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1

View File

@ -31,10 +31,7 @@ type
AlignDemoButton: TSpeedButton; AlignDemoButton: TSpeedButton;
QuitButton: TSpeedButton; QuitButton: TSpeedButton;
PaintTreeDemoButton: TSpeedButton; PaintTreeDemoButton: TSpeedButton;
Bevel1: TBevel;
MainPanel: TPanel; MainPanel: TPanel;
Bevel2: TBevel;
Bevel3: TBevel;
StatusBar: TStatusBar; StatusBar: TStatusBar;
ContainerPanel: TPanel; ContainerPanel: TPanel;
Label1: TLabel; Label1: TLabel;

View File

@ -1,18 +1,19 @@
object WindowsXPForm: TWindowsXPForm object WindowsXPForm: TWindowsXPForm
Left = 339 Left = 61
Height = 581 Height = 487
Top = 275 Top = 185
Width = 829 Width = 829
HorzScrollBar.Page = 828 HorzScrollBar.Page = 828
VertScrollBar.Page = 580 VertScrollBar.Page = 486
ActiveControl = XPTree ActiveControl = XPTree
Caption = 'WindowsXPForm' Caption = 'WindowsXPForm'
ClientHeight = 581 ClientHeight = 487
ClientWidth = 829 ClientWidth = 829
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.25'
object Label1: TLabel object Label1: TLabel
Left = 576 Left = 576
Height = 80 Height = 80
@ -26,7 +27,7 @@ object WindowsXPForm: TWindowsXPForm
end end
object Label2: TLabel object Label2: TLabel
Left = 576 Left = 576
Height = 81 Height = 97
Top = 144 Top = 144
Width = 243 Width = 243
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@ -38,8 +39,8 @@ object WindowsXPForm: TWindowsXPForm
object Label4: TLabel object Label4: TLabel
Cursor = crHandPoint Cursor = crHandPoint
Left = 577 Left = 577
Height = 117 Height = 136
Top = 248 Top = 256
Width = 243 Width = 243
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
AutoSize = False AutoSize = False
@ -53,8 +54,9 @@ object WindowsXPForm: TWindowsXPForm
OnClick = Label4Click OnClick = Label4Click
end end
object XPTree: TVirtualStringTree object XPTree: TVirtualStringTree
Cursor = 63
Left = 8 Left = 8
Height = 516 Height = 416
Top = 40 Top = 40
Width = 554 Width = 554
AutoScrollDelay = 500 AutoScrollDelay = 500