LCL/TreeView: Add custom drawing demo project. Put existing add_remove demo project into separate folder.

This commit is contained in:
wp_xyz 2025-02-09 15:57:40 +01:00
parent 8f5c0d7288
commit 328192f456
17 changed files with 1022 additions and 11 deletions

Binary file not shown.

View File

@ -5,7 +5,10 @@ uses
Forms,
TV_Add_Remove_U1 in 'TV_Add_Remove_U1.pas' {Form1};
{$R *.res}
begin
Application.Scaled:=True;
Application.Title:='TV_Add_Remove';
Application.Initialize;
Application.CreateForm(TForm1, Form1);

Binary file not shown.

View File

@ -1,29 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="10"/>
<Version Value="12"/>
<General>
<Flags>
<SaveClosedFiles Value="False"/>
<SaveOnlyProjectUnits Value="True"/>
<LRSInOutputDirectory Value="False"/>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/>
<Title Value="TV_Add_Remove"/>
<Scaled Value="True"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="1">
<Item1>
@ -55,6 +59,9 @@
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>

View File

@ -7,7 +7,7 @@ object Form1: TForm1
Caption = 'TreeView Example 1'
ClientHeight = 427
ClientWidth = 455
LCLVersion = '1.9.0.0'
LCLVersion = '4.99.0.0'
object tv_eg1: TTreeView
Left = 0
Height = 427
@ -26,8 +26,8 @@ object Form1: TForm1
Top = 8
Width = 75
Caption = 'Add'
OnClick = but_AddClick
TabOrder = 1
OnClick = but_AddClick
end
object but_Remove: TButton
Left = 208
@ -35,7 +35,7 @@ object Form1: TForm1
Top = 40
Width = 75
Caption = 'Remove'
OnClick = but_RemoveClick
TabOrder = 2
OnClick = but_RemoveClick
end
end

View File

@ -61,7 +61,7 @@ begin
else begin
{Get a name for the new node}
sText := 'New node';
InputQuery( 'New Node', 'Caption ?', sText );
InputQuery( 'New Child Node', 'Caption', sText );
{Add the node as a child of the selected node}
with tv_eg1.Items.AddChild( tv_eg1.Selected, sText ) do

View File

@ -0,0 +1,336 @@
object MainForm: TMainForm
Left = 314
Height = 548
Top = 130
Width = 709
AutoSize = True
Caption = 'TreeView Custom Drawing'
ClientHeight = 548
ClientWidth = 709
LCLVersion = '4.99.0.0'
OnCreate = FormCreate
OnDestroy = FormDestroy
object TreeView: TTreeView
Left = 304
Height = 548
Top = 0
Width = 405
Align = alClient
Constraints.MinWidth = 400
Images = ImageList1
ReadOnly = True
TabOrder = 0
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end
object Panel1: TPanel
Left = 0
Height = 548
Top = 0
Width = 304
Align = alLeft
AutoSize = True
BevelOuter = bvNone
ClientHeight = 548
ClientWidth = 304
TabOrder = 1
object btnToggleEnabledDisabled: TButton
AnchorSideLeft.Control = lbTask
AnchorSideTop.Control = cmbExpandSign
AnchorSideTop.Side = asrBottom
Left = 8
Height = 25
Top = 442
Width = 205
AutoSize = True
BorderSpacing.Top = 8
BorderSpacing.Bottom = 8
Caption = 'Toggle 1st node enabled/disabled'
TabOrder = 0
OnClick = btnToggleEnabledDisabledClick
end
object cbShowLines: TCheckBox
AnchorSideLeft.Control = cbShowButtons
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbShowButtons
Left = 119
Height = 19
Top = 390
Width = 74
BorderSpacing.Left = 20
Caption = 'Show lines'
Checked = True
State = cbChecked
TabOrder = 1
OnChange = cbShowLinesChange
end
object cbMultiSelect: TCheckBox
AnchorSideLeft.Control = cbShowLines
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbShowLines
Left = 213
Height = 19
Top = 390
Width = 81
BorderSpacing.Left = 20
Caption = 'Multi-select'
TabOrder = 2
OnChange = cbMultiSelectChange
end
object Label1: TLabel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideRight.Control = lbTask
AnchorSideRight.Side = asrBottom
Left = 8
Height = 45
Top = 8
Width = 280
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 8
Caption = 'Select a drawing task and click on a tree node. '#13#10'To see the hot-track effect move the mouse over some nodes'
WordWrap = True
end
object cbShowButtons: TCheckBox
AnchorSideLeft.Control = lbTask
AnchorSideTop.Control = lbTask
AnchorSideTop.Side = asrBottom
Left = 8
Height = 19
Top = 390
Width = 91
Caption = 'Show buttons'
Checked = True
State = cbChecked
TabOrder = 3
OnChange = cbShowButtonsChange
end
object lbTask: TListBox
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 8
Height = 321
Top = 61
Width = 288
BorderSpacing.Around = 8
Items.Strings = (
'Default (themed)'
'Default (not themed)'
'Default + hot-track (themed)'
'Default + hot-track (not themed)'
'Bold top-level nodes'
'Top-level node gradient'
'RowSelect + hot-track (full line)'
'RowSelect + hot-track (at icon)'
'RowSelect + hot-track (at text)'
'RowSelect + hot-track + gradient (full line)'
'RowSelect + hot-track + gradient (icon to end)'
'RowSelect + hot-track + gradient (text to end)'
'RowSelect + hot-track + gradient (at text only)'
'Selection and hot-track as image'
'Background image (themed)'
'Background image (not themed)'
'Background image, no hot-track icons (themed)'
'Background gradient (themed)'
'Background gradient (not themed)'
)
ItemHeight = 15
TabOrder = 4
OnClick = lbTaskClick
end
object cmbExpandSign: TComboBox
AnchorSideLeft.Control = lbTask
AnchorSideTop.Control = cbShowButtons
AnchorSideTop.Side = asrBottom
Left = 8
Height = 23
Top = 411
Width = 104
BorderSpacing.Top = 2
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'themed sign'
'+/- sign'
'blank arrow'
'filled arrow'
'> symbol'
)
Style = csDropDownList
TabOrder = 5
Text = 'themed sign'
OnChange = cmbExpandSignChange
end
end
object ImageList1: TImageList
Scaled = True
Left = 390
Top = 147
Bitmap = {
4C7A020000001000000010000000E60300000000000078DAAD936B4C5B6518C7
0F83E9C8968871730B32CC96E9324D16F5C34089C22E0E1DD179BFDF3E1035F1
EB58248BD1CC644467A0598C1B443414365C3B06945B1182956B295D4B6929A5
85AEA3A5ACD096DECE697B7A7AFE9E7318D320A7CB92F5E497BC79CFF37BFFE7
79D21700011108996E1B0F52D4ACC7269961D763DD538DC7D42E47F188CBB19B
5B13DCDE9DBCACD6F1A7DF6BEA1A6AACFB315A679BC7EF5EA06609B86075A351
FA13F5EA952E4DA6C290BFD6DBDE3E71647F8F45F5D9F882BFD19B44F3AC1383
F27350B5D4A0B7BD1E7F5FAE44ADF93A7E70B3784DB7E8CD554E0D655E9D785B
C85418740707EC64478085621968E2907962E856B543535B8ED15FCBD1A994E1
672785B30B4005C777F32C9EECB3939B5B8DFA2D1D56D59E7E37FD448F25FCB1
CE4DFDD9AF84467A1AED5A357E5B6251BDC842AE5163A8EE342EFFA5C41B3A4F
34B77B9ACAED73D25B3AADAA4CCEDFAF8FA1D044E3F0D01CD37CFE6BE6F88883
AAF130B7FBAF7227715CE322AFFC529E2C1AB8C1149AE2E01DDE4DB77D39F3E0
E2577866EA3ADE32F821BF740EAF4F04D97DBDD6D0D16167F808C7DE1E6BE84D
6388E5DFF135F9060F9E1ABB8047FB2A6C1BEC1F39086E8C69EC7DC8F1BF8BCA
F65328B533289B4BE27D830F87D4F3C2BA749641B5FC0C0E6ACF204FFD02471E
76F77DE348578E0D3C70E32C36D2D95839270D399112BCB3308C4FCC01146B6F
A274C68217F5DFE25975BEE01D182DC6BED1F3D8D4A11D4C6B9BEEDF3A4A618F
3E88BD8E4A6C0F6D15CEE19F1D91223C37FAB9E0F01C1D388CE7350D78FC5A18
BC43702E21339664282C033B067D64C1980FD28B12E4BB9AB12D76403883F70A
B51FA2D8A8405D83047C0D571BCD689BD6102DA65784FF3990B6A165E28B475A
F5965A6915FBB299C607B6040AEC2D28502B8535BF575B2F61772AF4A68CABC6
3242264BFFDF7DA9D66EDCD53CF2FDC3DD33D6978C11B6C41040BEDA8D639314
9BDD6337E7360D57119DB6FBEF740F08A9617356875992DD65F13FD461F665B5
4D4AF8BDBBBD8744A36627D1A0CE4959738F7EC68632A4C274F164DC587FA228
950F96059B64C03209241334470C0C1D0513A7109A9FC2E41FA7C849E9894362
3EEFE6C9D5EB92888611749A60123983F7930C9F1947928E09994C9C44221611
5C9A0A8226030838C661BA7432BEAECFB99FF61A53120FFB8479ACE7AFF69A88
914266820ADDCA5D463CE217DC586849DCE7DC8A6BF694C4828BA2FEDA5EE391
D55CAF90CBBBD1C04D719F739B673D29892E2F88FAFFE6AEF6EA5DC90C7A84DC
E8B21B947F5EDCE7E634E58FA484F2B944FDFFCE78A5D795EFA56EE5923E2748
EF9CB8BF664E82EBE75DD76D37B2E410F5EF867B756FFF0156FCF26B
}
BitmapAdv = {
4C69020000004C7A020000001800000018000000BF0600000000000078DAE596
7B7054D51DC737D954D2A4B6B1C2542938E3A3DA3AC3A31D09152C22B6686528
436BA58016712C749CD60E23B682D571046B5B467938B4260461E411F6991091
34906212C0E6B1F7EE26BB9B64C983249BC7EE6637C966F7EEEB3EBEFD9DBB61
93B4B4DD55FFB2D97CE6CCB9F79CCFF99DDFF9EDBD0B4083FF0334A71AEECE35
5B8FE6183981B5ACFF9978754D4BF3CCD673B9263EF2A3C6FEC4EB3D51AC6A18
90A81FCD2FB355B3FB193B5F437641E9C76B7F7F689F679EFE82F0739B573E3C
2CE3C830504214F980FD1E054FB6F89505C61A6147C9BEC08DBA8BCF683EFA28
E7BF7ACF76CCD01A2D9BBE68B2BA6F3B6B0F1DA92885F5E0AF71D97000E6B60E
1CF127FDEF92FF586B072EE80F80A3FB45153ACCA97486728D565FB691DBA679
BF397F9A57CFCFCA315876DD60E4C61756BB42BBBB82383D0A9808C3B088CAC6
4BB094BC8486A3AFE27CE5495C3AF12734156D87B9B60AFB06E3D83304BC493C
7745C0BD17BA4239465ED09AB8839A527E36F36BF59C7C83895776758EE16F41
E00C79CB997F04D013A53E11671B2E827B771B6CFBB780A7984FD754E21D72EF
F5027B3CC01FC9BF9B786D00F899630CB486926DE0A464FC16147CD82ECF30F3
CA82F32EE95AFC65BE28AA2F5681276FFDB1DD28B759D5FC943A5DA8D1ED05F7
97E771FA7C19F6F68627E3FF7BA7F805238F2F55B44ACC7BCDBFC01643617314
73AABB15CABF5252BC4B693AF01CEACA0FC1D4E9C6FB94FBA3FEC9F33D48711F
76B951653E84461A5752BC5B9941F36E3EEB92165943984FBEA9FE7BAD312C6A
8E6385338155AD09D8DFDA843B0C97E4AF94372B4FD9BC4A89579EF413FBBD0A
3652FD149C6E11E7EAEA6436FE5167140F39E2286C89E35BFC14FFB913B8BDB9
1F0B69CD07EC713CDA96F43FDD29E2E1261F6EAA6861F58ED58D0332ABFFC7D4
FAB7CA796556697E6D9FFC5447723C9BC7E62FA438EFB678905F569EF43BB720
4B998182C006CC7735D31EE2EAF88D1D22B6764B78A157C693F611DC7AA655A2
EF2FF2CA6CE28A8621655B8F842D747F63A7A48E7F98E615365FC5B79BFE8CC2
FA0731A7EAF5945F93FA64E3ABE3AB70C8B0124F5C11B199F6F07C8F8C9D6E05
6F0C2AEA9EDF1850B0C32DABD79FE992F05397883345EBB0C4F22A16D7DF4F2C
5649F9CD75C8EFDD839CF8DC29EB685010FD0E9678DEC3D6AB716CEF93A9F692
7ED6BE48FDADDD09AC75D6E07B9667534EC6A2FA1FE21BF57FA51AAD4B9DEF97
FF11C1AD9671CCEE3E813CE1BE69EBDC28DE816581B7F1DBFEB0EADFE98E637D
DB0758665937CD5BD8B801F32C067CBD29A8FAA6D64FEEA510663644703B17C3
3CAAA562E30F7073F8FBD3D6C99367E1A6CBDBF140D323D3BC4B2DBF82EEF0E3
9847F5C1E6CF6A8CAABE94DFC8BDA3317091DC737DE2EC4601F7506DB1F35A4E
B5BAAC9BC39DC167A15572D535E6F06B54E777EB976205BF038F385BF0A02359
0FDFA4B8D8FCDCAA3E4963E0A3E43C38F90CB2DC46FDE359265B68E68521B59E
9750ADAD6C8DE3C7AE041EEFB98A85632FE0166E1DD6B4ECC7862B03EAF595F4
5D596A4FFABF56E755B28DB6B0C668FD50A3E7EEBAEE33D4C8DF9765E01BB8B7
36E3CECB3E3C447B58DD2E627D87845F502DB23DB3763DD5EEEAF6049653ECF7
7C1C00F7F6666419F9E674DF07CBDFD3AFA3676D577E85235C6819C54F28D6A7
BB927ED6B2FEFD1C9DE399D670B689EF5B7CAC62CB2779CF688DDC135AA3D57B
4BA52BBCDA21A8FE354E0173CF7785B4267E44A3B3FC52A3D76B3FD53BF2034B
1EC5F88AD6C887999FB539D467D73FD377FC49CB4C8DAEF1286BD39EF339FBB3
1F7F1199E03CF57205A5212B133F1485FE6528B2448890254602B218879C8841
4A4421C52310A3E3E8A83C106E3DF5F2DE4CFCD3DD13DE7F714B7101622C8CD8
B81FEDE57F08DB4FECFC4DDA7E72173B7A93D87BA67015C52D8C6E14116234A4
EE41F0BBD1AA7B25623FFED2DAB4FC948FC586FAFF09732722412484318CF7B7
C171F277B174FCB298F88FF950A1B8139149774218453C3CA29E777AFE18CC1D
83C400CC5718FD3031E8F7C8247D30B5337A6124E2A140DA7E16F3A66A7B46C4
43FEF4FDA97C08A97C88FF968F644E58DC3172C7C68733F00BA8757B51DBE799
C2106A7B1983A861F40C4CA11FB1A02F6D3F8BF94DAE3B23A263DEF4FD69E683
C51C0B7A557774CC93B69FD59ED31780D3CBF0C3710DCFF0043E38861814F304
D1D1A10CFC419475793322323298BE9F7232351FF169F9F0A5F2C1628E8C0E92
7B80E84FDBCFBC9E60109EB1B10946E119658C60E81A238109FC180AF82104DC
E9FB29E6B691704608FEBE0CFC13F998C8C9F5F34104FAD5B8995B18EE4DDB7F
BDDA9BE6266F44F54EBAC3C33D69FB3F0D9FB7DF0BFF04B89A943A4C7A020000
002000000020000000210900000000000078DAED970B5094D715C757418C1D74
AC4D6C741C75B0D65A9D38265191341AABF5359AD6B4355363AA26D626769CDA
34AD4D25956974B4248A8226C5F2508396DDE5A5F8442D880A2BBBCBF2DA45DE
C8435C792CAF7D3FFE3DF77EBBB0AB60FC043BD31917FE03DFF7DD7B7EE79E73
EEF9EE0290E099444B929437432255C60D91A9BBD85F76FD3FE14A558B2432D5
39926B885CE59A7C4187213215D835BF4FCF079D1986A112A97A35F114C480BF
5CED7A2DBB067BEE9811D30CECA9B760514E1D8625E5331F3044AE2E94C895BF
966466FA0F882BD3068E4A546C3D7A24D4F8BB7F1DC124798EF3CDBC0644DDB5
E1780B104F62FC68D257F7817D0D76BCA96CC2E4E45C271B1F7DE4535360E2CD
9D9254CD6851DC538AEF524EC386CAD586E1D25B901DF90B8AF76F4061C4FBB8
9E7614C915B502BFD9CD27F697A463B76B91917A948F63E3D93C369FE2D12591
AB0E499215131E5D539AA96C1CD59495C571CA459D6BBBAE0549AD2E9C2DAFC1
8DB4681447BCC76DDF3AB60B6714371077CF0E79BE06D74F86F3FB4507362233
3102F10525F8C75D6043493BA65C2E17F22253D92432F50949A272A66F9C95EF
4AE4EA2B9E9A0AC9AAC4FEDA2EA4B70369062085246F03A4A4A4DAFBF84F860C
9AA8AD6E9EE04F41E41664A4C723A6A209117AE08B7BC0E7A4BD4D541FE4C7E6
B22E4CBF5AE95DAB571957E0F37B0848CE4758B90117897B9E944EDCD38CDFF6
30BF20EA0381EF8E47C1A1DF22E34C3C622B1A7BF8E1A47D6EFE67A430D2DA22
03FC93F2E1617AF81473B86384399915D85BDDE9C33F575A869BC987517C6013
E7E57EBD1BA9AA3CC4EA1D482C2AC1356904DDDFC8E37F8D727142AD21BE4B58
3F6993AE13532F57F470A9267CF8632E55619AA21581674A3C31C2F4B31A1CBD
980A557CA8507F073723FB4C0C92CAEB7CEAFFA8BBFE8F95D521E3740C0A681C
1B7F332E1407CF9FC1D473053D6B1B9E52842937F49CE7CD1F7DB10AB30BAD08
29B62238BF1363CF9721E1F00E6EE7DAA1ADF832250127EADA70AA154820317E
5C732F9FD5FF618A7B24E940950151A9A7F83C369FD9093C5D8C579406CC2FB2
720EE379F347D1F54C8D0573E8F9C2121B96E96C38F9EF237CFE08791E1FFB5C
B206CB73EB1079D7EABBFFEF7BF6BF0D2B6E3562444A01AFF700691E9F7FFC64
149693BD852556CC25FB8C33CA9B5FB01DC36A37606A4935661758F01AC56089
D68658792C9FFF6EB903AF5C6FC07329421CFD2877ACFF7D5663E2FCDD7542FF
F34F72D7905C850997CAF00B9D91CF6776166B85D8BE4C6BFFA1FA1E82B2C2F1
E285CF05BE760B6D440986B802F0EDB677F0D2ED42BC41FC1837FF9D0A07DEAF
72605BAD134B557A8C4C2BECA9A309E7B43DFF53BF72CDCCACC6E60A0B8DB7D3
3C3B9FCFECBC416B9F5758839795E198AB5880798A79E4E3DF7DF8BD3F4331A6
73253EB9B293CF5F5B6EC3864A073EAC71E20F779CD859EFC4A6D20E7C27BD98
D7148B47C88D7A7C5C6BC747F4FCC31A073692BF6BCB05FEBEB470CC57FD8D98
219CEB51FFFCDE9FD98D6311D2908AF59576FCA69AC5C0811DF52EEC6A706123
F536B6EE1FE73622ACD1C5EFB3E79B89BD9ED6BE4AABC696F38B11AC08F6E13E
C44FC9869F2E147ED6F1FDFA31DAF2125ED7C7E1831A2BFEE88EC1FA1203E72F
223EBB16D66EA7BC6761816A539F4CA65715CB3029339CEA25BBA7FEFDCF57E2
056507C654C720C03CAD5F3F46DA83B0A0F5003E6E30625DB1C05F90D3883FD3
3BF857A56789BBB65FEE1CC51AFC20EF6BBC70CB8061C4F3DE7F7EE72A315A61
C238A519416A2326552563724B50BF7E7CCB311633F43BE077FA024272A3F1BA
7255BFDCE5D92B314B7D1A41AA6E8C27FB8CC3783EFD37BD1C81B926F2CD8489
2A33A6E59B1199188BE3892BF03CD522ED8E3EFD9890FFD37EB9F3959B9110F7
73444A63C89E0593C82EB31F986BE4BC1EBE5455C6F74F5A896B645633F7718A
DA8C438931BC7E17D0DE09A9566162C77ADAA3FE8FE4072BE663A1EA232C292E
E07D8CCD6776983D6697D9671CF79E2D759F7302E8FFDF931F1DBC6FA5DF768D
CB3120C2CD677D83F58F55B76D5859538EE9EDDBE0EF1AE1C30F56FC083FD1EC
C21A5D251FE7E9376C3EB3333EA71DC3CF967B7A85919D6F24B29C11BEE7809C
3174FED82761E70F3A07EC8E3DC8E7CFE53DD98A15A536AC21DBEBA81FADAB6D
C014FD76BCA87E1B7372F66163A59EEEDBB1A6CCCE7B2DEB5F730B2D7CFE9EF8
43A0F3858B6CDAE99D1FCDCE578F3EF7A926B2717F8DFE029AFD9B30F6720DD9
32514FB662F56D3BEF2BAC1FADD008F5CF7A33BB66F7D973362EB8D08C7157EB
F87C6687C6C9685DDF13730E5C4DC5B7E4B854C3F74792C61994D580655A0BDE
2A137AEB52751BE7CFCE6EE0D76F516C9613FBFB37EED1DED638796F3A26D32E
8D3FF5B3819DF9954B287685CCDEF0D422E7AC1C3DD6920F8BDDFC59D9F5789B
F8AFDE6AC688B462CEA5F1A5A45F0EDA770099CC8FFC788F62D8C8CF0BE93AE7
8CAC3ACE9F78897AC759ADFB8C49CFF93899DF53F9FE43354BEBFA84DE3B9D9E
F79EFB9DDBC9EE3F58D34FED7BD829D5F3B45F13F859564E7FE9FAFFF27BECB3
8FCFA738E14F18A874D24F33B4B2B08027E5032EFA75D1AF132E2793836487CB
6187D36183D3CE642559E0B03199E1B03299603777A2FA6AB44997189A5911B9
6DF813F17BD80E419CEB615BFB609BDC32C26E31C266EA40F5957F920F3B45FB
C0F80FB36DBE6C0FD79B6D61EC6E41E62ED88CED4FE403E7BBE33D4FAE10250F
9BE5C066EA84B5BB4DB40F025FC8B568BE179BE5C066EC80B5AB15D597BF3269
13432F3F2E5F4CAE7BD7FC20BBDD2D032C9D2D7C5F3C3E5F5CAEB93CDC07D82C
074CA2F86EF6862BC5039287CD72208E6FE1EB1E143EB1AD5DE2E23F905C5BBB
0D5E5C812D36FFDF986BF3A373ED615B38BB994B14DFCDDEABAE1E903C6C4BC7
7D917C21DE83C227B6A5432F8A3FD05CF77205B6B95D2C7F60B9F6B0CD9C7D8F
4B14DFCD4EADD20F481EB6D9D024922FC47B50F8C4361BEE8AE28BCE75A76FAE
85753771B689D8A636B17CF175E69D6B61CD1E76239728BE9B5DDAD63D2079D8
A6D606917C61CD83C227B6A9B55E14BF27DEDD4F966B61DD0D9C6D24B6B1452C
FF7172ADEF23D777BDD6DCCB36B6D489E33F664FE9ABCE7CD975829AEF88E47B
C7BBB98F78F7EEEBDE78F7E6FA41767773AD28FEA3D94D7DB01F8EB7B1E54E0F
BBFBBE38FED3D2B36FB70F7FFE0BCA56E4B6
}
end
end

View File

@ -0,0 +1,548 @@
unit main;
{$mode objfpc}{$H+}
interface
uses
Classes, ComCtrls, ExtCtrls, SysUtils, Forms, Controls, Graphics, Dialogs,
StdCtrls;
type
{ TMainForm }
TMainForm = class(TForm)
btnToggleEnabledDisabled: TButton;
cbShowLines: TCheckBox;
cbMultiSelect: TCheckBox;
cbShowButtons: TCheckBox;
cmbExpandSign: TComboBox;
ImageList1: TImageList;
Label1: TLabel;
lbTask: TListBox;
Panel1: TPanel;
TreeView: TTreeView;
procedure btnToggleEnabledDisabledClick(Sender: TObject);
procedure cbMultiSelectChange(Sender: TObject);
procedure cbShowButtonsChange(Sender: TObject);
procedure cbShowLinesChange(Sender: TObject);
procedure cmbExpandSignChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure lbTaskClick(Sender: TObject);
// Here are the event handlers for several custom-drawing tasks
// An image is drawn as an overall background of the treeview
procedure BackgroundImage_AdvancedCustomDraw(Sender: TCustomTreeView;
const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
procedure BackgroundImage_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
// A gradient is drawn as an overall background of the tree
procedure BackgroundGradient_AdvancedCustomDraw(Sender: TCustomTreeView;
const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
procedure BackgroundGradient_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
// The top-level nodes are painted with bold font
procedure BoldTopLevel_CustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
// Selection and hot-tracked lines
procedure RowSelectHotTrack_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
// Selection and hot-tracked lines are drawn as a gradient
procedure RowSelectHotTrackGradient_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
// Selection and hot-tracked lines drawn with bitmap fill
procedure SelectHotTrackImage_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
// The top-level nodes are drawn with a gradient
procedure TopLevelGradient_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
private
FBackImg, FSelectionImg, FHotTrackImg: TPicture;
procedure PopulateTree;
public
end;
var
MainForm: TMainForm;
implementation
{$R *.lfm}
const
tDefault_Themed = 0;
tDefault_NotThemed = 1;
tDefault_HotTrack_Themed = 2;
tDefault_HotTrack_NotThemed = 3;
tTopLevelBold = 4;
tTopLevelGradient = 5;
tRowSelect_HotTrack_Full = 6;
tRowSelect_HotTrack_Icon = 7;
tRowSelect_HotTrack_Text = 8;
tRowSelect_HotTrack_Gradient_Full = 9;
tRowSelect_HotTrack_Gradient_Icon = 10;
tRowSelect_HotTrack_Gradient_Text = 11;
tRowSelect_HotTrack_Gradient_TextOnly = 12;
tSelectHotTrack_Image = 13;
tBackgroundImage_Themed = 14;
tBackgroundImage_NotThemed = 15;
tBackgroundImage_Themed_NoHotTrackIcons = 16;
tBackgroundGradient_Themed = 17;
tBackgroundGradient_NotThemed = 18;
procedure TMainForm.FormCreate(Sender: TObject);
begin
PopulateTree;
TreeView.Selected := TreeView.Items.GetFirstNode;
FBackImg := TPicture.Create;
FBackImg.LoadFromFile(Application.Location + 'paw-gray.png');
FSelectionImg := TPicture.Create;
FSelectionImg.LoadFromFile(Application.Location + 'water1.jpg');
FHotTrackImg := TPicture.Create;
FHotTrackImg.LoadFromFile(Application.Location + 'water2.jpg');
lbTask.ItemIndex := 0;
end;
procedure TMainForm.FormDestroy(Sender: TObject);
begin
FBackImg.Free;
FSelectionImg.Free;
FHotTrackImg.Free;
end;
procedure TMainForm.btnToggleEnabledDisabledClick(Sender: TObject);
var
node: TTreeNode;
begin
node := TreeView.Items.GetFirstNode;
node.Enabled := not node.Enabled;
end;
procedure TMainForm.cbMultiSelectChange(Sender: TObject);
begin
if cbMultiSelect.Checked then
TreeView.Options := TreeView.Options + [tvoAllowMultiSelect]
else
TreeView.Options := TreeView.Options - [tvoAllowMultiSelect];
end;
procedure TMainForm.cbShowButtonsChange(Sender: TObject);
begin
if cbShowButtons.Checked then
TreeView.Options := TreeView.Options + [tvoShowButtons]
else
TreeView.Options := TreeView.Options - [tvoShowButtons];
end;
procedure TMainForm.cbShowLinesChange(Sender: TObject);
begin
if cbShowLines.Checked then
TreeView.Options := TreeView.Options + [tvoShowLines]
else
TreeView.Options := TreeView.Options - [tvoShowLines];
end;
procedure TMainForm.cmbExpandSignChange(Sender: TObject);
begin
TreeView.ExpandSignType := TTreeViewExpandSignType(cmbExpandSign.ItemIndex);
end;
procedure TMainForm.PopulateTree;
function AddChild(AParent: TTreeNode; ACaption: String; AImgIndex: Integer): TTreeNode;
begin
Result := TreeView.Items.AddChild(AParent, ACaption);
Result.ImageIndex := AImgIndex;
Result.SelectedIndex := AImgIndex;
end;
function AddSibling(ANode: TTreeNode; ACaption: String; AImgIndex: Integer): TTreeNode;
begin
Result := TreeView.Items.Add(ANode, ACaption);
Result.ImageIndex := AImgIndex;
Result.SelectedIndex := AImgIndex;
end;
var
node: TTreeNode;
begin
node := AddChild(nil, 'DateTimeCtrls', 0);
AddChild(node, 'datetimectrls.pas', 1);
AddChild(node, 'lclcalwrapper.pas', 1);
node := AddChild(nil, 'DockedFormEditor', 0);
AddChild(node, 'dockedformeditor.pas', 1);
AddChild(node, 'dockedstrconsts.pas', 1);
node := AddChild(nil, 'VirtualTreeView', 0);
AddChild(node, 'laz.virtualtrees.pas', 1);
AddChild(node, 'laz.lclconstants.inc', 1);
AddChild(node, 'lazlclfunctions.inc', 1);
AddChild(node, 'laz.registervirtualtreeview.pas', 1);
TreeView.FullExpand;
end;
procedure TMainForm.lbTaskClick(Sender: TObject);
begin
TreeView.OnCustomDraw := nil;
TreeView.OnCustomDrawitem := nil;
TreeView.OnAdvancedCustomDraw := nil;
TreeView.OnAdvancedCustomDrawItem := nil;
TreeView.Options := TreeView.Options + [tvoThemedDraw] - [tvoHotTrack, tvoRowSelect];
// Select the event handler and options for the drawing task
case lbTask.ItemIndex of
tDefault_Themed:
;
tDefault_NotThemed:
TreeView.Options := TreeView.Options - [tvoThemedDraw];
tDefault_HotTrack_Themed:
TreeView.Options := TreeView.Options + [tvoHotTrack];
tDefault_HotTrack_NotThemed:
TreeView.Options := TreeView.Options - [tvoThemedDraw] + [tvoHotTrack];
tTopLevelBold:
TreeView.OnCustomDrawItem := @BoldTopLevel_CustomDrawItem;
tTopLevelGradient:
begin
TreeView.Options := TreeView.Options - [tvoThemedDraw];
TreeView.OnAdvancedCustomDrawItem := @TopLevelGradient_AdvancedCustomDrawItem;
end;
tRowSelect_HotTrack_Full,
tRowSelect_HotTrack_Icon,
tRowSelect_HotTrack_Text:
begin
// tvoRowSelect is not needed for this visual effect, but allows to
// change the selection by clicking anywhere, not just on the node text.
TreeView.Options := TreeView.Options + [tvoRowSelect, tvoHotTrack] - [tvoThemedDraw];
TreeView.OnAdvancedCustomDrawItem := @RowSelectHotTrack_AdvancedCustomDrawItem;
end;
tRowSelect_HotTrack_Gradient_Full,
tRowSelect_HotTrack_Gradient_Icon,
tRowSelect_HotTrack_Gradient_Text,
tRowSelect_HotTrack_Gradient_TextOnly:
begin
// tvoRowSelect is not needed for this visual effect, but allows to
// change the selection by clicking anywhere, not just on the node text.
TreeView.Options := TreeView.Options + [tvoRowSelect, tvoHotTrack] - [tvoThemedDraw];
TreeView.OnAdvancedCustomDrawItem := @RowSelectHotTrackGradient_AdvancedCustomDrawItem;
end;
tSelectHotTrack_Image:
begin
TreeView.Options := TreeView.Options + [tvoHotTrack] - [tvoThemedDraw];
TreeView.OnAdvancedCustomDrawItem := @SelectHotTrackImage_AdvancedCustomDrawItem;
end;
tBackgroundImage_Themed,
tBackgroundImage_Themed_NoHotTrackIcons:
begin
TreeView.Options := TreeView.Options + [tvoHotTrack];
TreeView.OnAdvancedCustomDraw := @BackgroundImage_AdvancedCustomDraw;
TreeView.OnAdvancedCustomDrawItem := @BackgroundImage_AdvancedCustomDrawItem;
end;
tBackgroundImage_NotThemed:
begin
TreeView.Options := TreeView.Options + [tvoHotTrack] - [tvoThemedDraw];
TreeView.OnAdvancedCustomDraw := @BackgroundImage_AdvancedCustomDraw;
TreeView.OnAdvancedCustomDrawItem := @BackgroundImage_AdvancedCustomDrawItem;
end;
tBackgroundGradient_Themed:
begin
TreeView.Options := TreeView.Options + [tvoHotTrack];
TreeView.OnAdvancedCustomDraw := @BackgroundGradient_AdvancedCustomDraw;
TreeView.OnAdvancedCustomDrawItem := @BackgroundGradient_AdvancedCustomDrawItem;
end;
tBackgroundGradient_NotThemed:
begin
TreeView.Options := TreeView.Options + [tvoHotTrack] - [tvoThemedDraw];
TreeView.OnAdvancedCustomDraw := @BackgroundGradient_AdvancedCustomDraw;
TreeView.OnAdvancedCustomDrawItem := @BackgroundGradient_AdvancedCustomDrawItem;
end;
end;
TreeView.Invalidate;
end;
procedure TMainForm.BackgroundGradient_AdvancedCustomDraw(Sender: TCustomTreeView;
const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
begin
if Stage = cdPrePaint then
begin
// Draw the gradient
Sender.Canvas.GradientFill(ARect, clSkyBlue, clWhite, gdVertical);
// Avoid painting the normal background below the last node
Sender.Canvas.Brush.Color := clNone;
end;
// We must not set DefaultDraw to false here because the CustomDraw
// PrePaint stage would force us to paint everything by ourselves.
end;
procedure TMainForm.BackgroundGradient_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
begin
case Stage of
cdPreErase:
// Avoid overwriting the gradient with the node background color
Sender.Canvas.Brush.Color := clNone;
cdPostErase:
// Set selected and hot-track color as usual
if ([cdsFocused, cdsSelected] * State <> []) then
begin
Sender.Canvas.Brush.Color := clNavy;
Sender.Canvas.Font.Color := clYellow;
Sender.Canvas.Font.Style := [fsBold];
end else
if (cdsHot in State) then
begin
Sender.Canvas.Brush.Color := clGray;
Sender.Canvas.Font.Color := clHighlightText;
Sender.Canvas.Font.Style := [];
end;
end;
end;
procedure TMainForm.BackgroundImage_AdvancedCustomDraw(Sender: TCustomTreeView;
const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
var
x, y: Integer;
begin
if Stage = cdPrePaint then
begin
// Draw the image
y := 0;
while (y < TreeView.ClientHeight) do
begin
x := 0;
while (x < TreeView.ClientWidth) do
begin
TreeView.Canvas.Draw(x, y, FBackImg.Graphic);
inc(x, FBackImg.Width);
end;
inc(y, FBackImg.Height);
end;
// Avoid painting the normal background below the last node
Sender.Canvas.Brush.Color := clNone;
// We must not set DefaultDraw to false here because the CustomDraw
// PrePaint stage would force us to paint everything by ourselves.
end;
end;
procedure TMainForm.BackgroundImage_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
begin
case Stage of
cdPreErase:
// Avoid overwriting the image with the node background color
Sender.Canvas.Brush.Color := clNone;
cdPostErase:
// Avoid drawing the default hottrack node text background over the image
if (cdsSelected in State) then
Sender.Canvas.Brush.Color := clHighlight
else
if (cdsHot in State) then
begin
Sender.Canvas.Brush.Color := clNone;
if lbTask.ItemIndex = tBackgroundImage_Themed_NoHotTrackIcons then
PaintImages := false;
end;
end;
end;
// This OnCustomDrawItem handler uses a bold font to draw the top-level tree nodes
procedure TMainForm.BoldTopLevel_CustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if Node.Level = 0 then
Sender.Canvas.Font.Style := [fsBold]
else
Sender.Canvas.Font.Style := [];
end;
{ Full row highlighting. Depending on the selection in the Task radiogroup,
there are three possibilities:
- highlighting across the entire row
- highlighting starting at the icon
- highlighting starting at the node text. }
procedure TMainForm.RowSelectHotTrack_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
var
R: TRect;
idx: Integer;
begin
if Stage = cdPostErase then
begin
if [cdsFocused, cdsSelected] * State <> [] then // Selected node
Sender.Canvas.Brush.Color := clRed
else
if cdsHot in State then // Hot-tracked node
Sender.Canvas.Brush.Color := $ccccff
else
Sender.Canvas.Brush.Color := clWindow; // Normal nodes
idx := lbTask.ItemIndex;
case lbTask.ItemIndex of
tRowSelect_HotTrack_Full: // full with of displayed node
DefaultDraw := true;
tRowSelect_HotTrack_Icon: // beginning at icon
begin
R := Node.DisplayRect(false);
R.Left := Node.DisplayIconLeft;
Sender.Canvas.FillRect(R);
// do not draw the default full width highlight:
DefaultDraw := false;
end;
tRowSelect_HotTrack_Text: // beginning at node text
begin
R := Node.DisplayRect(false);
R.Left := Node.DisplayTextLeft;
Sender.Canvas.FillRect(R);
// do not draw the default full width highlight:
DefaultDraw := false;
end;
end;
end;
// Turn off hot-track underlining
Sender.Canvas.Font.Style := [];
end;
{ Full row highlighting by a gradient.
Depending on the selection in the Task radiogroup, there are three possibilities:
- highlighting across the entire row
- highlighting starting at the icon
- highlighting starting at the node text. }
procedure TMainForm.RowSelectHotTrackGradient_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
var
R: TRect;
startColor, endColor: TColor;
begin
if Stage = cdPostErase then
begin
if [cdsFocused, cdsSelected] * State <> [] then // Selected node
begin
startColor := clRed;
endColor := $ccccff;
end else
if cdsHot in State then // Hot-tracked node
begin
startColor := $ccccff;
endColor := clWhite;
end else
begin
Sender.Canvas.Brush.Color := clWindow; // Normal nodes
DefaultDraw := true;
exit;
end;
R := Node.DisplayRect(false);
case lbTask.ItemIndex of
tRowSelect_HotTrack_Gradient_Full: // Full with of displayed node
;
tRowSelect_HotTrack_Gradient_Icon: // Beginning at icon
R.Left := Node.DisplayIconLeft;
tRowSelect_HotTrack_Gradient_Text: // Beginning at node text
R.Left := Node.DisplayTextLeft;
tRowSelect_HotTrack_Gradient_TextOnly: // Node text only
R := Node.DisplayRect(true);
end;
Sender.Canvas.GradientFill(R, startColor, endColor, gdHorizontal);
// Avoid drawing the standard node text highlight background
Sender.Canvas.Brush.Style := bsClear;
//or: Sender.Canvas.Brush.Color := clNone;
// Turn off the default full-row highlighting (just for completeness,
// is turned off by the clear brush style anyway).
DefaultDraw := false;
end;
// Turn off hot-track underlining
Sender.Canvas.Font.Style := [];
end;
procedure TMainForm.SelectHotTrackImage_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
var
R: TRect;
begin
if Stage = cdPostErase then
begin
if [cdsFocused, cdsSelected] * State <> [] then // Selected node
begin
Sender.Canvas.Brush.Style := bsImage;
Sender.Canvas.Brush.Bitmap := FSelectionImg.Bitmap;
end else
if cdsHot in State then // Hot-tracked node
begin
Sender.Canvas.Brush.Style := bsImage;
Sender.Canvas.Brush.Bitmap := FHotTrackImg.Bitmap;
end else
Sender.Canvas.Brush.Color := clWindow; // Normal nodes
R := Node.DisplayRect(true);
Sender.Canvas.FillRect(R);
// Avoid drawing the standard node text highlight background
Sender.Canvas.Brush.Style := bsClear;
// Turn off the default full-row highlighting (just for completeness,
// is turned off by the clear brush style anyway).
DefaultDraw := false;
end;
// Turn off hot-track underlining
Sender.Canvas.Font.Style := [];
end;
procedure TMainForm.TopLevelGradient_AdvancedCustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage;
var PaintImages, DefaultDraw: Boolean);
var
R: TRect;
begin
if Stage = cdPostErase then
begin
R := Node.DisplayRect(false);
if Node.Level = 0 then
begin
Sender.Canvas.Brush.Color := clNone;
Sender.Canvas.GradientFill(R, clSkyBlue, clWhite, gdHorizontal);
DefaultDraw := false;
end;
end;
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,9 @@
{
"customdrawing" : {
"Category" : "General",
"Keywords" : [
"TTreeView"
],
"Description" : "Demonstrates how to apply the OnCustomDraw/OnCustomDrawItem and OnAdvancedCustomDraw/OnAdvancedCustomDrawItem events for tuning the visual appearance of the treeview."
}
}

View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<Title Value="treeview_customdraw_demo"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes>
<Item Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages>
<Item>
<PackageName Value="LCL"/>
</Item>
</RequiredPackages>
<Units>
<Unit>
<Filename Value="treeview_customdraw_demo.lpr"/>
<IsPartOfProject Value="True"/>
</Unit>
<Unit>
<Filename Value="main.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MainForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="treeview_customdraw_demo"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions>
<Item>
<Name Value="EAbort"/>
</Item>
<Item>
<Name Value="ECodetoolError"/>
</Item>
<Item>
<Name Value="EFOpenError"/>
</Item>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,28 @@
program treeview_customdraw_demo;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
{$IFDEF HASAMIGA}
athreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, main
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource := True;
Application.Scaled := True;
{$PUSH}{$WARN 5044 OFF}
Application.MainFormOnTaskbar := True;
{$POP}
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB