This commit is contained in:
David Arranz 2007-08-09 17:06:47 +00:00
parent 18773faa49
commit 15c88b8548
1210 changed files with 330992 additions and 0 deletions

View File

@ -0,0 +1,89 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{e70a9b07-e0a1-4df8-8014-86b52366964c}</ProjectGuid>
<MainSource>dclcxBarEditItemD11.dpk</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dclcxBarEditItemD11.bpl</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_AssertionsAtRuntime>False</DCC_AssertionsAtRuntime>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_WriteableConstants>True</DCC_WriteableConstants>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_AssertionsAtRuntime>False</DCC_AssertionsAtRuntime>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_WriteableConstants>True</DCC_WriteableConstants>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Package_Options>
<Package_Options Name="PackageDescription">ExpressBars cxEditor item by Developer Express Inc.</Package_Options>
<Package_Options Name="ImplicitBuild">False</Package_Options>
<Package_Options Name="DesigntimeOnly">True</Package_Options>
<Package_Options Name="RuntimeOnly">False</Package_Options>
</Package_Options>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">3082</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">dclcxBarEditItemD11.dpk</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="dclcxBarEditItemD11.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="cxBarEditItemD11.dcp" />
<DCCReference Include="cxBarEditItemReg" />
<DCCReference Include="dclcxEditorsD11.dcp" />
<DCCReference Include="dclcxExtEditorsD11.dcp" />
<DCCReference Include="dxBarD11.dcp" />
<DCCReference Include="xBarConverte" />
<DCCReference Include="xBarRe" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,97 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{49c2891a-0fde-4239-8790-7fb2baf75c9b}</ProjectGuid>
<MainSource>dxBarD11.dpk</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxBarD11.bpl</DCC_DependencyCheckOutputName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
<DCC_AssertionsAtRuntime>False</DCC_AssertionsAtRuntime>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_WriteableConstants>True</DCC_WriteableConstants>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Version>7.0</Version>
<DCC_AssertionsAtRuntime>False</DCC_AssertionsAtRuntime>
<DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_WriteableConstants>True</DCC_WriteableConstants>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>DEBUG</DCC_Define>
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Package_Options>
<Package_Options Name="PackageDescription">ExpressBars by Developer Express Inc.</Package_Options>
<Package_Options Name="ImplicitBuild">False</Package_Options>
<Package_Options Name="DesigntimeOnly">False</Package_Options>
<Package_Options Name="RuntimeOnly">True</Package_Options>
</Package_Options>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">3082</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">dxBarD11.dpk</Source>
</Source>
</Delphi.Personality> </BorlandProject></BorlandProject>
</ProjectExtensions>
<ItemGroup />
<ItemGroup>
<DelphiCompile Include="dxBarD11.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="cxLibraryD11.dcp" />
<DCCReference Include="dxBar" />
<DCCReference Include="dxBarAccessibility" />
<DCCReference Include="dxBarAddGroupItemsEd" />
<DCCReference Include="dxBarCommon" />
<DCCReference Include="dxBarCustForm" />
<DCCReference Include="dxBarItemEd" />
<DCCReference Include="dxBarNameEd" />
<DCCReference Include="dxBarPopupMenuEd" />
<DCCReference Include="dxBarSkin" />
<DCCReference Include="dxBarSkinConsts" />
<DCCReference Include="dxBarStrs" />
<DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="dxFading" />
<DCCReference Include="dxStatusBar" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>

View File

@ -0,0 +1,43 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USERES("BandedDemo.res");
USEFORM("BandedDemoMain.cpp", BandedDemoMainForm);
USEFORM("BandedDemoData.cpp", BandedDemoDataDM); /* TDataModule: File Type */
USEFORM("..\Common\DemoRating.cpp", DemoRatingForm);
USEFORM("..\Common\DemoBasicAbout.cpp", DemoBasicAboutForm);
USEFORM("..\Common\DemoBasicMain.cpp", DemoBasicMainForm);
USEFORM("BandedDemoBands.cpp", BandedDemoBandsForm);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->HelpFile = "..\\..\\Help\\EQTreeList4.hlp";
Application->Title = "ExpressQuantumTreeList4 BandedDemo";
Application->CreateForm(__classid(TBandedDemoDataDM), &BandedDemoDataDM);
Application->CreateForm(__classid(TBandedDemoMainForm), &BandedDemoMainForm);
Application->CreateForm(__classid(TBandedDemoBandsForm), &BandedDemoBandsForm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,26 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "BandedDemoBands.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxButtons"
#pragma link "cxContainer"
#pragma link "cxControls"
#pragma link "cxListBox"
#pragma link "cxLookAndFeelPainters"
#pragma resource "*.dfm"
TBandedDemoBandsForm *BandedDemoBandsForm;
//---------------------------------------------------------------------------
__fastcall TBandedDemoBandsForm::TBandedDemoBandsForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoBandsForm::btnCancelClick(TObject &Sender)
{
Close();
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,50 @@
object BandedDemoBandsForm: TBandedDemoBandsForm
Left = 288
Top = 185
ActiveControl = lbBands
BorderStyle = bsDialog
Caption = 'Remove Bands'
ClientHeight = 282
ClientWidth = 284
Color = 15451300
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object lbBands: TcxListBox
Left = 8
Top = 8
Width = 265
Height = 233
ItemHeight = 13
MultiSelect = True
Style.Color = 16247513
TabOrder = 0
end
object btnOK: TcxButton
Left = 102
Top = 248
Width = 75
Height = 25
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 1
LookAndFeel.NativeStyle = True
end
object btnCancel: TcxButton
Left = 190
Top = 248
Width = 75
Height = 25
Cancel = True
Caption = 'Cancel'
TabOrder = 2
OnClick = btnCancelClick
LookAndFeel.NativeStyle = True
end
end

View File

@ -0,0 +1,30 @@
//---------------------------------------------------------------------------
#ifndef BandedDemoBandsH
#define BandedDemoBandsH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxButtons.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxListBox.hpp"
#include "cxLookAndFeelPainters.hpp"
//---------------------------------------------------------------------------
class TBandedDemoBandsForm : public TForm
{
__published: // IDE-managed Components
TcxListBox *lbBands;
TcxButton *btnOK;
TcxButton *btnCancel;
void __fastcall btnCancelClick(TObject &Sender);
private: // User declarations
public: // User declarations
__fastcall TBandedDemoBandsForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TBandedDemoBandsForm *BandedDemoBandsForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppVCLApplication</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.node" name="name" value="BandedDemo.exe"/>
<property category="build.node" name="sparelibs" value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.1" value="$(SYSDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.2" value="$(USERDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.3" value="NO_WIN32_LEAN_AND_MEAN"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BCB)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.5" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.6" value="..\Common"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BCB)\lib\release"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BCB)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.4" value="$(BCB)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.5" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="."/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="$(LIBRARIES)"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="import32.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="cp32mt.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0w32.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="Memmgr.Lib"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.3" value="$(PACKAGES)"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.4" value="sysinit.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
</optionset>
</project>
</BCBPROJECT>
<Source>
<Source Name="MainSource">BandedDemo.cpp</Source>
</Source>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.10.00"/>
<PROJECT value="BandedDemo.exe"/>
<OBJFILES value="BandedDemo.obj BandedDemoMain.obj BandedDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj BandedDemoBands.obj"/>
<RESFILES value="BandedDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) BandedDemoMain.dfm BandedDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm BandedDemoBands.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="BandedDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder10"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder10"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="BandedDemo.exe"/>
<OBJFILES value="BandedDemo.obj BandedDemoMain.obj BandedDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj BandedDemoBands.obj"/>
<RESFILES value="BandedDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) BandedDemoMain.dfm BandedDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm BandedDemoBands.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<SPARELIBS value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="BandedDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder5"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder5"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="BandedDemo.exe"/>
<OBJFILES value="BandedDemo.obj BandedDemoMain.obj BandedDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj BandedDemoBands.obj"/>
<RESFILES value="BandedDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) BandedDemoMain.dfm BandedDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm BandedDemoBands.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="BandedDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder6"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder6"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,29 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "BandedDemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxStyles"
#pragma link "cxTL"
#pragma resource "*.dfm"
TBandedDemoDataDM *BandedDemoDataDM;
//---------------------------------------------------------------------------
__fastcall TBandedDemoDataDM::TBandedDemoDataDM(TComponent* Owner)
: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------
void TBandedDemoDataDM::SetParentValue(Variant AValue)
{
if (tblDepartments->State == dsEdit ||
tblDepartments->State == dsInsert)
tblDepartments->FindField("ParentID")->Value = AValue;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,216 @@
object BandedDemoDataDM: TBandedDemoDataDM
Left = 310
Top = 163
Height = 229
Width = 325
object Database: TDatabase
Connected = True
DatabaseName = 'DemosDB'
DriverName = 'STANDARD'
Params.Strings = (
'PATH=..\..\Data'
'DEFAULT DRIVER=PARADOX'
'ENABLE BCD=FALSE')
SessionName = 'Default'
Left = 40
Top = 8
end
object tblDepartments: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'DEPARTMENTS.DB'
Left = 40
Top = 64
object tblDepartmentsID: TAutoIncField
FieldName = 'ID'
Visible = False
end
object tblDepartmentsPARENTID: TIntegerField
FieldName = 'PARENTID'
Visible = False
end
object tblDepartmentsNAME: TStringField
FieldName = 'NAME'
Size = 50
end
object tblDepartmentsBUDGET: TFloatField
FieldName = 'BUDGET'
end
object tblDepartmentsPHONE: TStringField
FieldName = 'PHONE'
Size = 50
end
object tblDepartmentsFAX: TStringField
FieldName = 'FAX'
Size = 50
end
object tblDepartmentsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 255
end
object tblDepartmentsVACANCY: TBooleanField
FieldName = 'VACANCY'
end
object tblDepartmentsMANAGERID: TIntegerField
FieldName = 'MANAGERID'
Visible = False
end
end
object dsDepartments: TDataSource
DataSet = tblDepartments
Left = 40
Top = 112
end
object dsPersons: TDataSource
DataSet = tblPersons
Left = 160
Top = 120
end
object tblPersons: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'PERSONS.DB'
Left = 160
Top = 72
object tblPersonsID: TIntegerField
FieldName = 'ID'
end
object tblPersonsName: TStringField
FieldName = 'Name'
Size = 50
end
object tblPersonsAddress: TStringField
FieldName = 'Address'
Size = 100
end
object tblPersonsPhone: TStringField
FieldName = 'Phone'
Size = 24
end
object tblPersonsFax: TStringField
FieldName = 'Fax'
Size = 24
end
object tblPersonsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 100
end
end
object StyleRepository: TcxStyleRepository
Left = 160
Top = 8
object cxStyle1: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle2: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle3: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clWhite
end
object cxStyle4: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15252642
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = 11032875
end
object cxStyle5: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle6: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15253902
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle7: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle8: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle9: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle10: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 4707838
TextColor = clBlack
end
object cxStyle11: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle12: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle13: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 16048336
TextColor = clBlack
end
object TreeListStyleSheetDevExpress: TcxTreeListStyleSheet
Caption = 'DevExpress'
Styles.Background = cxStyle1
Styles.Content = cxStyle5
Styles.Inactive = cxStyle9
Styles.Selection = cxStyle13
Styles.BandBackground = cxStyle2
Styles.BandHeader = cxStyle3
Styles.ColumnHeader = cxStyle4
Styles.ContentEven = cxStyle7
Styles.ContentOdd = cxStyle6
Styles.Footer = cxStyle8
Styles.IncSearch = cxStyle10
Styles.Indicator = cxStyle11
Styles.Preview = cxStyle12
BuiltIn = True
end
end
end

View File

@ -0,0 +1,62 @@
//---------------------------------------------------------------------------
#ifndef BandedDemoDataH
#define BandedDemoDataH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include "cxTL.hpp"
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TBandedDemoDataDM : public TDataModule
{
__published: // IDE-managed Components
TDatabase *DataBase;
TTable *tblDepartments;
TAutoIncField *tblDepartmentsID;
TIntegerField *tblDepartmentsPARENTID;
TStringField *tblDepartmentsNAME;
TFloatField *tblDepartmentsBUDGET;
TStringField *tblDepartmentsPHONE;
TStringField *tblDepartmentsFAX;
TStringField *tblDepartmentsEMAIL;
TBooleanField *tblDepartmentsVACANCY;
TIntegerField *tblDepartmentsMANAGERID;
TDataSource *dsDepartments;
TDataSource *dsPersons;
TTable *tblPersons;
TIntegerField *tblPersonsID;
TStringField *tblPersonsName;
TStringField *tblPersonsAddress;
TStringField *tblPersonsPhone;
TStringField *tblPersonsFax;
TStringField *tblPersonsEMAIL;
TcxStyleRepository *StyleRepository;
TcxStyle *cxStyle1;
TcxStyle *cxStyle2;
TcxStyle *cxStyle3;
TcxStyle *cxStyle4;
TcxStyle *cxStyle5;
TcxStyle *cxStyle6;
TcxStyle *cxStyle7;
TcxStyle *cxStyle8;
TcxStyle *cxStyle9;
TcxStyle *cxStyle10;
TcxStyle *cxStyle11;
TcxStyle *cxStyle12;
TcxStyle *cxStyle13;
TcxTreeListStyleSheet *TreeListStyleSheetDevExpress;
private: // User declarations
public: // User declarations
__fastcall TBandedDemoDataDM(TComponent* Owner);
void SetParentValue(Variant AValue);
};
//---------------------------------------------------------------------------
extern PACKAGE TBandedDemoDataDM *BandedDemoDataDM;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,214 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "BandedDemoMain.h"
#include "BandedDemoData.h"
#include "BandedDemoBands.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxData"
#pragma link "cxDBData"
#pragma link "cxEdit"
#pragma link "cxFilter"
#pragma link "cxGraphics"
#pragma link "cxStyles"
#pragma link "cxLookAndFeels"
#pragma link "DemoBasicMain"
#pragma link "cxDBLookupComboBox"
#pragma link "cxDBTL"
#pragma link "cxEditRepositoryItems"
#pragma link "cxInplaceContainer"
#pragma link "cxMaskEdit"
#pragma link "cxTL"
#pragma link "cxTLData"
#pragma resource "*.dfm"
TBandedDemoMainForm *BandedDemoMainForm;
//---------------------------------------------------------------------------
__fastcall TBandedDemoMainForm::TBandedDemoMainForm(TComponent* Owner)
: TDemoBasicMainForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::FormShow(TObject *Sender)
{
/* remove/add the closing slash on this line to disable/enable the following code */
cxDBTreeList->FullExpand();
cxDBTreeListNAME->ApplyBestFit();
//*/
/* remove/add the closing slash on this line to disable/enable the following code *
ShowMessage("WARNING: tutorial not completed. First, please apply the steps "
"shown in the doc file");
//*/
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::LookAndFeelChange(TObject *Sender)
{
if (((TMenuItem*)Sender)->Tag > 3){
cxLookAndFeelController->NativeStyle =
!cxLookAndFeelController->NativeStyle;
((TMenuItem*)Sender)->Checked = cxLookAndFeelController->NativeStyle;
}
else{
((TMenuItem*)Sender)->Checked = true;
cxLookAndFeelController->Kind = (TcxLookAndFeelKind)((TMenuItem*)Sender)->Tag;
cxLookAndFeelController->NativeStyle = false;
miNativeStyle->Checked = false;
}
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::miAddBandClick(TObject *Sender)
{
/* remove/add the closing slash on this line to disable/enable the following code */
String ABandCaption;
if (InputQuery("Create band", "Specify a caption of the band", ABandCaption))
if (GetBandByCaption(ABandCaption) != NULL)
MessageDlg("Band with this caption already exists", mtWarning, TMsgDlgButtons()<<mbOK, 0);
else {
TcxTreeListBand *ABand = cxDBTreeList->Bands->Add();
ABand->Caption->Text = ABandCaption;
ABand->Caption->AlignHorz = taCenter;
}
//*/
}
//---------------------------------------------------------------------------
void TBandedDemoMainForm::HideCoulmns()
{
for (int J = 0; J < cxDBTreeList->ColumnCount; J++)
if ((cxDBTreeList->Columns[J]->OwnerBand == NULL) &&
cxDBTreeList->Columns[J]->Visible)
cxDBTreeList->Columns[J]->Visible = false;
}
void TBandedDemoMainForm::AddBands(TStrings *AStringList)
{
for (int I = 0; I < cxDBTreeList->Bands->Count; I++)
AStringList->AddObject(cxDBTreeList->Bands->Items[I]->Caption->Text,
cxDBTreeList->Bands->Items[I]);
}
void TBandedDemoMainForm::RemoveBands(TcxListBox *AListBox)
{
for (int I = 0; I < AListBox->Items->Count; I++)
if (AListBox->Selected[I])
((TcxTreeListBand*)AListBox->Items->Objects[I])->Free();
HideCoulmns();
}
void __fastcall TBandedDemoMainForm::miRemoveBandsClick(TObject *Sender)
{
/* remove/add the closing slash on this line to disable/enable the following code */
TBandedDemoBandsForm *AForm = new TBandedDemoBandsForm(NULL);
__try{
AForm->lbBands->Items->Clear();
AddBands(AForm->lbBands->Items);
if (AForm->ShowModal() == mrOk)
RemoveBands(AForm->lbBands);
}
__finally{
AForm->Free();
}
//*/
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::actCustomizationFormExecute(TObject *Sender)
{
cxDBTreeList->Customizing->Visible = true;
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::miBandHorzSizingClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsCustomizing->BandHorzSizing = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::miBandVertSizingClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsCustomizing->BandVertSizing = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::miBandMovingClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsCustomizing->BandMoving = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::mnuNodeOptionsPopup(TObject *Sender)
{
FHitBand = cxDBTreeList->HitTest->HitBand;
if (FHitBand == NULL)
Abort;
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::miBandDeleteClick(TObject *Sender)
{
FHitBand->Free();
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::miBandHideClick(TObject *Sender)
{
FHitBand->Visible = false;
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::cxDBTreeListInitInsertingRecord(
TObject *Sender, TcxTreeListDataNode *AFocusedNode, bool &AHandled)
{
if (AFocusedNode != NULL)
{
BandedDemoDataDM->SetParentValue(AFocusedNode->ParentValue);
}
}
//---------------------------------------------------------------------------
TcxTreeListBand* TBandedDemoMainForm::GetBandByCaption(String ABandCaption)
{
TcxTreeListBand *Result = NULL;
for (int I = 0; I < cxDBTreeList->Bands->Count; I++)
if (cxDBTreeList->Bands->Items[I]->Caption->Text == ABandCaption){
Result = cxDBTreeList->Bands->Items[I];
break;
}
return Result;
}
//---------------------------------------------------------------------------
Variant TBandedDemoMainForm::GetFocusedNodeParentValue()
{
return ((TcxTreeListDataNode*)cxDBTreeList->FocusedNode)->ParentValue;
}
//---------------------------------------------------------------------------
void __fastcall TBandedDemoMainForm::cxDBTreeListDragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept)
{
//
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,326 @@
inherited BandedDemoMainForm: TBandedDemoMainForm
Left = 88
Top = 38
Width = 891
Height = 621
Caption = 'ExpressQuantumTreeList4 BandedDemo'
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
inherited lscrip: TLabel
Width = 883
Height = 25
AutoSize = False
Caption =
'Create and remove bands at runtime. Experiment using the Options' +
' available and see Help/About for other things to try.'
end
inherited sbMain: TStatusBar
Top = 548
Width = 883
end
inherited memAboutText: TMemo
Lines.Strings = (
'In this demo you can:'
''
'- drag/drop columns between bands '
''
'- move and size bands (thus moving several columns at once)'
''
'- create/delete bands at runtime (see the Options menu or right-' +
'click any band header )'
''
'- temporarily hide bands and/or columns by dragging to the Custo' +
'mization dialog (see Options/Customization Form...).'
''
'- see how removing a band puts its columns into the Columns page' +
' of the dialog, ready for re-use in a different band.'
''
'- NOTE: if you haven'#39't done so already, you might like to practi' +
'ce by completing the tutorial version of this demo (see the tuto' +
'rials folder)')
TabOrder = 2
end
object cxDBTreeList: TcxDBTreeList [3]
Left = 0
Top = 25
Width = 883
Height = 523
Styles.StyleSheet = BandedDemoDataDM.TreeListStyleSheetDevExpress
Align = alClient
Bands = <
item
Caption.AlignHorz = taCenter
Caption.Text = 'Common department info'
Width = 331
end
item
Caption.AlignHorz = taCenter
Caption.Text = 'Detailed department info'
Width = 310
end
item
Caption.AlignHorz = taCenter
Caption.Text = 'Manager info'
Width = 445
end>
BufferedPaint = False
DataController.DataSource = BandedDemoDataDM.dsDepartments
DataController.ParentField = 'PARENTID'
DataController.KeyField = 'ID'
DragMode = dmAutomatic
OptionsBehavior.AutomateLeftMostIndent = False
OptionsData.Inserting = True
OptionsView.Bands = True
OptionsView.GridLineColor = 14916958
OptionsView.GridLines = tlglBoth
OptionsView.Indicator = True
OptionsView.UseNodeColorForIndent = False
PopupMenu = mnuNodeOptions
Preview.Place = tlppTop
Preview.Visible = True
RootValue = -1
TabOrder = 1
OnDragOver = cxDBTreeListDragOver
OnInitInsertingRecord = cxDBTreeListInitInsertingRecord
object cxDBTreeListID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'ID'
DataBinding.FieldName = 'ID'
Width = 63
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListPARENTID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'PARENTID'
DataBinding.FieldName = 'PARENTID'
Width = 62
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListNAME: TcxDBTreeListColumn
Caption.Text = 'NAME'
DataBinding.FieldName = 'NAME'
Width = 274
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListPHONE: TcxDBTreeListColumn
RepositoryItem = eriTelephoneMaskEdit
Caption.Text = 'PHONE'
DataBinding.FieldName = 'PHONE'
Width = 160
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListFAX: TcxDBTreeListColumn
RepositoryItem = eriTelephoneMaskEdit
Caption.Text = 'FAX'
DataBinding.FieldName = 'FAX'
Width = 90
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 1
end
object cxDBTreeListBUDGET: TcxDBTreeListColumn
Caption.Text = 'BUDGET'
DataBinding.FieldName = 'BUDGET'
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 1
end
object cxDBTreeListVACANCY: TcxDBTreeListColumn
Caption.Text = 'VACANCY'
DataBinding.FieldName = 'VACANCY'
Width = 120
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 1
end
object cxDBTreeListManager: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.ImmediatePost = True
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Name'
end>
Properties.ListSource = BandedDemoDataDM.dsPersons
Caption.Text = 'Manager'
DataBinding.FieldName = 'MANAGERID'
Width = 117
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 2
end
object cxDBTreeListManagerPhone: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Phone'
end>
Properties.ListSource = BandedDemoDataDM.dsPersons
Properties.ReadOnly = False
Caption.Text = 'Manager Phone'
DataBinding.FieldName = 'MANAGERID'
Width = 121
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 2
end
object cxDBTreeListManagerEmail: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'EMAIL'
end>
Properties.ListSource = BandedDemoDataDM.dsPersons
Properties.ReadOnly = False
Caption.Text = 'Manager Email'
DataBinding.FieldName = 'MANAGERID'
Width = 207
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 2
end
end
inherited mmMain: TMainMenu
inherited miOptions: TMenuItem
object miBandHorzSizing: TMenuItem [0]
Caption = 'Band Horz &Sizing'
Checked = True
Hint = 'Enables horizontal band sizing'
OnClick = miBandHorzSizingClick
end
object miBandVertSizing: TMenuItem [1]
Caption = 'Band &Vert Sizing'
Checked = True
Hint = 'Enables vertical band sizing'
OnClick = miBandVertSizingClick
end
object miBandMoving: TMenuItem [2]
Caption = 'Band &Moving'
Checked = True
Hint = 'Enables band moving'
OnClick = miBandMovingClick
end
object N2: TMenuItem [3]
Caption = '-'
end
object miAddBand: TMenuItem [4]
Caption = '&Create Band ...'
Hint = 'Click to create a new band'
OnClick = miAddBandClick
end
object miRemoveBands: TMenuItem [5]
Caption = '&Delete Band ...'
Hint = 'Click to remove an existing band'
OnClick = miRemoveBandsClick
end
object N1: TMenuItem [6]
Caption = '-'
end
object miColumnCustomization: TMenuItem [7]
Action = actCustomizationForm
end
object miSeparator1: TMenuItem [8]
Caption = '-'
end
object miGridLookFeel: TMenuItem [9]
Caption = '&Look&&Feel'
object miKind: TMenuItem
Caption = '&Kind'
object miFlat: TMenuItem
Caption = '&Flat'
GroupIndex = 1
Hint = 'Setting this option changes the demo appearance to Flat style'
RadioItem = True
OnClick = LookAndFeelChange
end
object miStandard: TMenuItem
Tag = 1
Caption = '&Standard'
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Standard styl' +
'e'
RadioItem = True
OnClick = LookAndFeelChange
end
object miUltraFlat: TMenuItem
Tag = 2
Caption = '&Ultra Flat'
Checked = True
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Ultra Flat st' +
'yle'
RadioItem = True
OnClick = LookAndFeelChange
end
object Office111: TMenuItem
Tag = 3
Caption = 'Office 11'
GroupIndex = 1
RadioItem = True
OnClick = LookAndFeelChange
end
end
object miNativeStyle: TMenuItem
Tag = 4
Caption = '&Native Style'
Hint = 'Setting this option changes the demo appearance to Native style'
OnClick = LookAndFeelChange
end
end
object miSeparator2: TMenuItem [10]
Caption = '-'
end
end
end
inherited alMain: TActionList
object actCustomizationForm: TAction
Category = 'Options'
Caption = '&Customization Form ...'
Hint = 'Shows the column customization form'
OnExecute = actCustomizationFormExecute
end
end
object mnuNodeOptions: TPopupMenu
OnPopup = mnuNodeOptionsPopup
Left = 88
Top = 8
object miBandDelete: TMenuItem
Caption = '&Delete Band'
Hint = 'Deletes selected Band'
OnClick = miBandDeleteClick
end
object miBandHide: TMenuItem
Caption = '&Hide Band'
Hint = 'Hides selected Band'
OnClick = miBandHideClick
end
object miCustomisationForm: TMenuItem
Action = actCustomizationForm
end
end
object cxEditRepository1: TcxEditRepository
Left = 432
Top = 48
object eriTelephoneMaskEdit: TcxEditRepositoryMaskItem
Properties.MaskKind = emkRegExprEx
Properties.EditMask = '(\((\d\d\d)?\))? \d(\d\d?)? - \d\d(\d\d)?( - \d\d)?'
end
end
end

View File

@ -0,0 +1,86 @@
//---------------------------------------------------------------------------
#ifndef BandedDemoMainH
#define BandedDemoMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxStyles.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include "cxLookAndFeels.hpp"
#include "DemoBasicMain.h"
#include "cxDBLookupComboBox.hpp"
#include "cxDBTL.hpp"
#include "cxEditRepositoryItems.hpp"
#include "cxInplaceContainer.hpp"
#include "cxMaskEdit.hpp"
#include "cxTL.hpp"
#include "cxTLData.hpp"
//---------------------------------------------------------------------------
class TBandedDemoMainForm : public TDemoBasicMainForm
{
__published: // IDE-managed Components
TMenuItem *miFlat;
TMenuItem *miUltraFlat;
TMenuItem *miStandard;
TMenuItem *miNativeStyle;
TcxDBTreeList *cxDBTreeList;
TcxDBTreeListColumn *cxDBTreeListID;
TcxDBTreeListColumn *cxDBTreeListPARENTID;
TcxDBTreeListColumn *cxDBTreeListNAME;
TcxDBTreeListColumn *cxDBTreeListPHONE;
TcxDBTreeListColumn *cxDBTreeListFAX;
TcxDBTreeListColumn *cxDBTreeListBUDGET;
TcxDBTreeListColumn *cxDBTreeListVACANCY;
TcxDBTreeListColumn *cxDBTreeListManager;
TcxDBTreeListColumn *cxDBTreeListManagerPhone;
TcxDBTreeListColumn *cxDBTreeListManagerEmail;
TPopupMenu *mnuNodeOptions;
TMenuItem *miBandDelete;
TMenuItem *miBandHide;
TMenuItem *miCustomisationForm;
TcxEditRepository *cxEditRepository1;
TcxEditRepositoryMaskItem *eriTelephoneMaskEdit;
void __fastcall FormShow(TObject *Sender);
void __fastcall LookAndFeelChange(TObject *Sender);
void __fastcall miAddBandClick(TObject *Sender);
void __fastcall miRemoveBandsClick(TObject *Sender);
void __fastcall actCustomizationFormExecute(TObject *Sender);
void __fastcall miBandHorzSizingClick(TObject *Sender);
void __fastcall miBandVertSizingClick(TObject *Sender);
void __fastcall miBandMovingClick(TObject *Sender);
void __fastcall mnuNodeOptionsPopup(TObject *Sender);
void __fastcall miBandDeleteClick(TObject *Sender);
void __fastcall miBandHideClick(TObject *Sender);
void __fastcall cxDBTreeListInitInsertingRecord(TObject *Sender,
TcxTreeListDataNode *AFocusedNode, bool &AHandled);
void __fastcall cxDBTreeListDragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept);
private:
TcxTreeListBand *FHitBand;
TcxTreeListBand* GetBandByCaption(String ABandCaption);
void HideCoulmns();
void AddBands(TStrings *AStringList);
void RemoveBands(TcxListBox *AListBox);
public:
__fastcall TBandedDemoMainForm(TComponent* Owner);
Variant GetFocusedNodeParentValue();
};
//---------------------------------------------------------------------------
extern PACKAGE TBandedDemoMainForm *BandedDemoMainForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,41 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USERES("BandedFixedDemo.res");
USEFORM("BandedFixedDemoMain.cpp", BandedFixedDemoMainForm);
USEFORM("BandedFixedDemoData.cpp", BandedFixedDemoDataDM); /* TDataModule: File Type */
USEFORM("..\Common\DemoRating.cpp", DemoRatingForm);
USEFORM("..\Common\DemoBasicAbout.cpp", DemoBasicAboutForm);
USEFORM("..\Common\DemoBasicMain.cpp", DemoBasicMainForm);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->HelpFile = "..\\..\\Help\\EQTreeList4.hlp";
Application->Title = "ExpressQuantumTreeList4 BandedFixedDemo";
Application->CreateForm(__classid(TBandedFixedDemoDataDM), &BandedFixedDemoDataDM);
Application->CreateForm(__classid(TBandedFixedDemoMainForm), &BandedFixedDemoMainForm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppVCLApplication</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.node" name="name" value="BandedFixedDemo.exe"/>
<property category="build.node" name="sparelibs" value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.1" value="$(SYSDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.2" value="$(USERDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.3" value="NO_WIN32_LEAN_AND_MEAN"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BCB)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.5" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.6" value="..\Common"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BCB)\lib\release"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BCB)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.4" value="$(BCB)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.5" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="."/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="$(LIBRARIES)"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="import32.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="cp32mt.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0w32.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="Memmgr.Lib"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.3" value="$(PACKAGES)"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.4" value="sysinit.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
</optionset>
</project>
</BCBPROJECT>
<Source>
<Source Name="MainSource">BandedFixedDemo.cpp</Source>
</Source>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.10.00"/>
<PROJECT value="BandedFixedDemo.exe"/>
<OBJFILES value="BandedFixedDemo.obj BandedFixedDemoMain.obj BandedFixedDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj"/>
<RESFILES value="BandedFixedDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) BandedFixedDemoMain.dfm BandedFixedDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="BandedFixedDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder10"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder10"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="BandedFixedDemo.exe"/>
<OBJFILES value="BandedFixedDemo.obj BandedFixedDemoMain.obj BandedFixedDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj"/>
<RESFILES value="BandedFixedDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) BandedFixedDemoMain.dfm BandedFixedDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<SPARELIBS value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="BandedFixedDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder5"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder5"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="BandedFixedDemo.exe"/>
<OBJFILES value="BandedFixedDemo.obj BandedFixedDemoMain.obj BandedFixedDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj"/>
<RESFILES value="BandedFixedDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) BandedFixedDemoMain.dfm BandedFixedDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="BandedFixedDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder6"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder6"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,41 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "BandedFixedDemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxStyles"
#pragma link "cxTL"
#pragma resource "*.dfm"
TBandedFixedDemoDataDM *BandedFixedDemoDataDM;
//---------------------------------------------------------------------------
__fastcall TBandedFixedDemoDataDM::TBandedFixedDemoDataDM(TComponent* Owner)
: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoDataDM::tblShedulerCalcFields(TDataSet *DataSet)
{
tblShedulerWeekSum->Value = tblShedulerSUNDAY->Value + tblShedulerMONDAY->Value +
tblShedulerTUESDAY->Value + tblShedulerWEDNESDAY->Value + tblShedulerTHURSDAY->Value +
tblShedulerFRIDAY->Value + tblShedulerSATURDAY->Value;
tblShedulerWeekAVG->Value = tblShedulerWeekSum->Value/7;
}
//---------------------------------------------------------------------------
String TBandedFixedDemoDataDM::GetProjectNameByID(int AProjectID)
{
return tblProjects->Lookup("ID", AProjectID, "Name");
}
//---------------------------------------------------------------------------
String TBandedFixedDemoDataDM::GetPersonNameByID(int APersonID)
{
return tblPersons->Lookup("ID", APersonID, "Name");
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,278 @@
object BandedFixedDemoDataDM: TBandedFixedDemoDataDM
Left = 310
Top = 163
Height = 373
Width = 325
object Database: TDatabase
Connected = True
DatabaseName = 'DemosDB'
DriverName = 'STANDARD'
Params.Strings = (
'PATH=..\..\Data'
'DEFAULT DRIVER=PARADOX'
'ENABLE BCD=FALSE')
SessionName = 'Default'
Left = 40
Top = 8
end
object tblSheduler: TTable
Active = True
DatabaseName = 'DemosDB'
OnCalcFields = tblShedulerCalcFields
TableName = 'SCHEDULER.DB'
Left = 40
Top = 64
object tblShedulerID: TAutoIncField
FieldName = 'ID'
ReadOnly = True
Visible = False
end
object tblShedulerPROJECTID: TIntegerField
FieldName = 'PROJECTID'
ReadOnly = True
Visible = False
end
object tblShedulerProjectManagerID: TIntegerField
FieldKind = fkLookup
FieldName = 'ProjectManagerID'
LookupDataSet = tblProjects
LookupKeyFields = 'ID'
LookupResultField = 'MANAGERID'
KeyFields = 'PROJECTID'
ReadOnly = True
Visible = False
Lookup = True
end
object tblShedulerUSERID: TIntegerField
FieldName = 'USERID'
ReadOnly = True
end
object tblShedulerSUNDAY: TSmallIntField
FieldName = 'SUNDAY'
end
object tblShedulerMONDAY: TSmallIntField
FieldName = 'MONDAY'
end
object tblShedulerTUESDAY: TSmallIntField
FieldName = 'TUESDAY'
end
object tblShedulerWEDNESDAY: TSmallIntField
FieldName = 'WEDNESDAY'
end
object tblShedulerTHURSDAY: TSmallIntField
FieldName = 'THURSDAY'
end
object tblShedulerFRIDAY: TSmallIntField
FieldName = 'FRIDAY'
end
object tblShedulerSATURDAY: TSmallIntField
FieldName = 'SATURDAY'
end
object tblShedulerWeekSum: TIntegerField
FieldKind = fkCalculated
FieldName = 'WeekSum'
Calculated = True
end
object tblShedulerWeekAVG: TFloatField
FieldKind = fkCalculated
FieldName = 'WeekAVG'
DisplayFormat = '#.#'
Calculated = True
end
end
object dsSheduler: TDataSource
DataSet = tblSheduler
Left = 40
Top = 112
end
object dsPersons: TDataSource
DataSet = tblPersons
Left = 144
Top = 112
end
object tblPersons: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'PERSONS.DB'
Left = 144
Top = 64
object tblPersonsID: TIntegerField
FieldName = 'ID'
end
object tblPersonsName: TStringField
FieldName = 'Name'
Size = 50
end
object tblPersonsAddress: TStringField
FieldName = 'Address'
Size = 100
end
object tblPersonsPhone: TStringField
FieldName = 'Phone'
Size = 24
end
object tblPersonsFax: TStringField
FieldName = 'Fax'
Size = 24
end
object tblPersonsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 100
end
end
object StyleRepository: TcxStyleRepository
Left = 160
Top = 8
object cxStyle1: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle2: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle3: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clWhite
end
object cxStyle4: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15252642
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = 11032875
end
object cxStyle5: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle6: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15784893
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle7: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle8: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle9: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle10: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 4707838
TextColor = clBlack
end
object cxStyle11: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 15451300
TextColor = clBlack
end
object cxStyle12: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle13: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 16048336
TextColor = clBlack
end
object stlGroupNode: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15253902
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clWhite
end
object stlFixedBand: TcxStyle
AssignedValues = [svColor]
Color = 15322014
end
object TreeListStyleSheetDevExpress: TcxTreeListStyleSheet
Caption = 'DevExpress'
Styles.Background = cxStyle1
Styles.Content = cxStyle5
Styles.Inactive = cxStyle9
Styles.Selection = cxStyle13
Styles.BandBackground = cxStyle2
Styles.BandHeader = cxStyle3
Styles.ColumnHeader = cxStyle4
Styles.ContentEven = cxStyle7
Styles.ContentOdd = cxStyle6
Styles.Footer = cxStyle8
Styles.IncSearch = cxStyle10
Styles.Indicator = cxStyle11
Styles.Preview = cxStyle12
BuiltIn = True
end
end
object dsProjects: TDataSource
DataSet = tblProjects
Left = 208
Top = 112
end
object tblProjects: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'PROJECTS.DB'
Left = 208
Top = 64
object tblProjectsID: TAutoIncField
FieldName = 'ID'
ReadOnly = True
end
object tblProjectsNAME: TStringField
FieldName = 'NAME'
Size = 100
end
object tblProjectsMANAGERID: TIntegerField
FieldName = 'MANAGERID'
end
end
end

View File

@ -0,0 +1,74 @@
//---------------------------------------------------------------------------
#ifndef BandedFixedDemoDataH
#define BandedFixedDemoDataH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include "cxTL.hpp"
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TBandedFixedDemoDataDM : public TDataModule
{
__published: // IDE-managed Components
TDatabase *DataBase;
TTable *tblSheduler;
TAutoIncField *tblShedulerID;
TIntegerField *tblShedulerPROJECTID;
TIntegerField *tblShedulerProjectManagerID;
TIntegerField *tblShedulerUSERID;
TSmallintField *tblShedulerSUNDAY;
TSmallintField *tblShedulerMONDAY;
TSmallintField *tblShedulerTUESDAY;
TSmallintField *tblShedulerWEDNESDAY;
TSmallintField *tblShedulerTHURSDAY;
TSmallintField *tblShedulerFRIDAY;
TSmallintField *tblShedulerSATURDAY;
TIntegerField *tblShedulerWeekSum;
TFloatField *tblShedulerWeekAVG;
TDataSource *dsSheduler;
TDataSource *dsPersons;
TTable *tblPersons;
TIntegerField *tblPersonsID;
TStringField *tblPersonsName;
TStringField *tblPersonsAddress;
TStringField *tblPersonsPhone;
TStringField *tblPersonsFax;
TStringField *tblPersonsEMAIL;
TcxStyleRepository *StyleRepository;
TcxStyle *cxStyle1;
TcxStyle *cxStyle2;
TcxStyle *cxStyle3;
TcxStyle *cxStyle4;
TcxStyle *cxStyle5;
TcxStyle *cxStyle6;
TcxStyle *cxStyle7;
TcxStyle *cxStyle8;
TcxStyle *cxStyle9;
TcxStyle *cxStyle10;
TcxStyle *cxStyle11;
TcxStyle *cxStyle12;
TcxStyle *cxStyle13;
TcxStyle *stlGroupNode;
TcxStyle *stlFixedBand;
TcxTreeListStyleSheet *TreeListStyleSheetDevExpress;
TDataSource *dsProjects;
TTable *tblProjects;
TAutoIncField *tblProjectsID;
TStringField *tblProjectsNAME;
TIntegerField *tblProjectsMANAGERID;
void __fastcall tblShedulerCalcFields(TDataSet *DataSet);
public:
String GetProjectNameByID(int AProjectID);
String GetPersonNameByID(int APersonID);
__fastcall TBandedFixedDemoDataDM(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TBandedFixedDemoDataDM *BandedFixedDemoDataDM;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,164 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "BandedFixedDemoMain.h"
#include "BandedFixedDemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxData"
#pragma link "cxDBData"
#pragma link "cxEdit"
#pragma link "cxFilter"
#pragma link "cxGraphics"
#pragma link "cxStyles"
#pragma link "cxLookAndFeels"
#pragma link "DemoBasicMain"
#pragma link "cxCalc"
#pragma link "cxDBLookupComboBox"
#pragma link "cxDBTL"
#pragma link "cxEditRepositoryItems"
#pragma link "cxInplaceContainer"
#pragma link "cxMaskEdit"
#pragma link "cxTL"
#pragma link "cxTLData"
#pragma resource "*.dfm"
TBandedFixedDemoMainForm *BandedFixedDemoMainForm;
//---------------------------------------------------------------------------
__fastcall TBandedFixedDemoMainForm::TBandedFixedDemoMainForm(TComponent* Owner)
: TDemoBasicMainForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm::FormShow(TObject *Sender)
{
if (cxDBTreeList->TopNode != NULL){
cxDBTreeList->TopNode->Focused = true;
cxDBTreeList->TopNode->MakeVisible();
}
/* remove/add the closing slash on this line to disable/enable the following code *
ShowMessage("WARNING: tutorial not completed. First, please apply the steps "
"shown in the doc file");
//*/
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm::LookAndFeelChange(TObject *Sender)
{
if (((TMenuItem*)Sender)->Tag > 3){
cxLookAndFeelController->NativeStyle =
!cxLookAndFeelController->NativeStyle;
((TMenuItem*)Sender)->Checked = cxLookAndFeelController->NativeStyle;
}
else{
((TMenuItem*)Sender)->Checked = true;
cxLookAndFeelController->Kind = (TcxLookAndFeelKind)((TMenuItem*)Sender)->Tag;
cxLookAndFeelController->NativeStyle = false;
miNativeStyle->Checked = false;
}
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: actCustomizationFormExecute(TObject *Sender)
{
cxDBTreeList->Customizing->Visible = true;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: miBandHorzSizingClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsCustomizing->BandHorzSizing = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: miBandVertSizingClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsCustomizing->BandVertSizing = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: miBandMovingClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsCustomizing->BandMoving = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: mnuNodeOptionsPopup(TObject *Sender)
{
FHitBand = cxDBTreeList->HitTest->HitBand;
if (FHitBand == NULL)
Abort();
else
miFixBand->Items[(int)FHitBand->FixedKind]->Checked = true;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: miBandHideClick(TObject *Sender)
{
FHitBand->Visible = false;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm::cxDBTreeListStylesGetContentStyle(
TObject *Sender, TObject *AItem, TcxTreeListNode *ANode,
TcxStyle *&AStyle)
{
if (ANode->IsGroupNode)
AStyle = BandedFixedDemoDataDM->stlGroupNode;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: cxDBTreeListEmployeeGetDisplayText(
TcxTreeListColumn *Sender, TcxTreeListNode *ANode, String &Value)
{
if (ANode->IsGroupNode){
int AProjectID = ANode->Values[cxDBTreeListPROJECTID->ItemIndex];
Value = "Project: " + BandedFixedDemoDataDM->GetProjectNameByID(AProjectID)+
"; Manager: " + BandedFixedDemoDataDM->GetPersonNameByID(
((TcxTreeListDataNode*)ANode)->KeyValue) + " (" + IntToStr(ANode->Count) + " employees)" ;
}
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: cxDBTreeListEmployeeGetEditProperties(
TcxTreeListColumn *Sender, TcxTreeListNode *ANode,
TcxCustomEditProperties *&EditProperties)
{
if (ANode->IsGroupNode)
EditProperties = cxEditRepository1TextItem1->Properties;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: miShowBandsClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsView->Bands = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: miShowHeadersClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
cxDBTreeList->OptionsView->Headers = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TBandedFixedDemoMainForm:: miFixBandClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = true;
FHitBand->FixedKind = TcxTreeListBandFixedKind(((TMenuItem*)Sender)->Tag);
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,415 @@
inherited BandedFixedDemoMainForm: TBandedFixedDemoMainForm
Left = 195
Top = 130
Width = 689
Height = 527
Caption = 'ExpressQuantumTreeList4 BandedFixedDemo'
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
inherited lscrip: TLabel
Width = 681
Height = 33
AutoSize = False
Caption =
'Fix columns on the left and right using bands. Experiment using ' +
'the Options available and see Help/About for other things to try' +
'.'
end
inherited sbMain: TStatusBar
Top = 454
Width = 681
end
inherited memAboutText: TMemo
Lines.Strings = (
'In this demo you can:'
''
'- click on columns to sort (hold down the shift key for sorting ' +
'multiple columns)'
''
'- scroll middle band horizontally without hiding the fixed bands'
''
'- move columns into/out of the fixed bands'
''
'- right-click a band and try the popup menu '
''
'- check how little source code is required'
''
'- NOTE: if you haven'#39't done so already, you might like to practi' +
'ce by completing the tutorial version of this demo (see the tuto' +
'rials folder)')
TabOrder = 2
end
object cxDBTreeList: TcxDBTreeList [3]
Left = 0
Top = 33
Width = 681
Height = 421
Styles.OnGetContentStyle = cxDBTreeListStylesGetContentStyle
Styles.StyleSheet = BandedFixedDemoDataDM.TreeListStyleSheetDevExpress
Align = alClient
Bands = <
item
Caption.AlignHorz = taCenter
Caption.Text = 'Employee'
FixedKind = tlbfLeft
Width = 261
end
item
Caption.Text = 'Days'
Width = 676
end
item
Caption.AlignHorz = taCenter
Caption.Text = 'Row Total'
FixedKind = tlbfRight
Width = 102
end>
BufferedPaint = False
DataController.DataSource = BandedFixedDemoDataDM.dsSheduler
DataController.ParentField = 'ProjectManagerID'
DataController.KeyField = 'USERID'
OptionsBehavior.AutomateLeftMostIndent = False
OptionsData.Deleting = False
OptionsView.Bands = True
OptionsView.Footer = True
OptionsView.GridLineColor = 14916958
OptionsView.GridLines = tlglBoth
OptionsView.Indicator = True
OptionsView.PaintStyle = tlpsCategorized
OptionsView.UseNodeColorForIndent = False
PopupMenu = mnuNodeOptions
Preview.Place = tlppTop
Preview.Visible = True
RootValue = -1
TabOrder = 1
object cxDBTreeListID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'ID'
DataBinding.FieldName = 'ID'
Options.Editing = False
Position.ColIndex = 12
Position.RowIndex = 0
Position.BandIndex = -1
end
object cxDBTreeListPROJECTID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'PROJECTID'
DataBinding.FieldName = 'PROJECTID'
Options.Editing = False
Position.ColIndex = 13
Position.RowIndex = 0
Position.BandIndex = -1
end
object cxDBTreeListProjectManagerID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'ProjectManagerID'
DataBinding.FieldName = 'ProjectManagerID'
Options.Editing = False
Position.ColIndex = 14
Position.RowIndex = 0
Position.BandIndex = -1
end
object cxDBTreeListEmployee: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Name'
end>
Properties.ListSource = BandedFixedDemoDataDM.dsPersons
Caption.Text = 'EMPLOYEE'
DataBinding.FieldName = 'USERID'
Options.Editing = False
Width = 156
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
OnGetDisplayText = cxDBTreeListEmployeeGetDisplayText
OnGetEditProperties = cxDBTreeListEmployeeGetEditProperties
end
object cxDBTreeListEmployeePhone: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Phone'
end>
Properties.ListSource = BandedFixedDemoDataDM.dsPersons
Caption.Text = 'PHONE'
DataBinding.FieldName = 'USERID'
Width = 105
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListEmployeeEmail: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'EMAIL'
end>
Properties.ListSource = BandedFixedDemoDataDM.dsPersons
Visible = False
Caption.Text = 'EMAIL'
DataBinding.FieldName = 'USERID'
Width = 267
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListSUNDAY: TcxDBTreeListColumn
RepositoryItem = cxEditRepositoryCalcItem
Caption.Text = 'SUNDAY'
DataBinding.FieldName = 'SUNDAY'
Options.Footer = True
Width = 88
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListMONDAY: TcxDBTreeListColumn
RepositoryItem = cxEditRepositoryCalcItem
Caption.Text = 'MONDAY'
DataBinding.FieldName = 'MONDAY'
Options.Footer = True
Width = 88
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListTUESDAY: TcxDBTreeListColumn
RepositoryItem = cxEditRepositoryCalcItem
Caption.Text = 'TUESDAY'
DataBinding.FieldName = 'TUESDAY'
Options.Footer = True
Width = 88
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListWEDNESDAY: TcxDBTreeListColumn
RepositoryItem = cxEditRepositoryCalcItem
Caption.Text = 'WEDNESDAY'
DataBinding.FieldName = 'WEDNESDAY'
Options.Footer = True
Width = 85
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListTHURSDAY: TcxDBTreeListColumn
RepositoryItem = cxEditRepositoryCalcItem
Caption.Text = 'THURSDAY'
DataBinding.FieldName = 'THURSDAY'
Options.Footer = True
Width = 119
Position.ColIndex = 4
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListFRIDAY: TcxDBTreeListColumn
RepositoryItem = cxEditRepositoryCalcItem
Caption.Text = 'FRIDAY'
DataBinding.FieldName = 'FRIDAY'
Options.Footer = True
Width = 95
Position.ColIndex = 5
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListSATURDAY: TcxDBTreeListColumn
RepositoryItem = cxEditRepositoryCalcItem
Caption.Text = 'SATURDAY'
DataBinding.FieldName = 'SATURDAY'
Options.Footer = True
Width = 113
Position.ColIndex = 6
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListWeekSum: TcxDBTreeListColumn
Caption.Text = 'SUM'
DataBinding.FieldName = 'WeekSum'
Options.Footer = True
Options.Editing = False
Width = 52
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 2
SummaryFooter.Kind = skSum
end
object cxDBTreeListWeekAVG: TcxDBTreeListColumn
Caption.Text = 'AVG'
DataBinding.FieldName = 'WeekAVG'
Options.Footer = True
Options.Editing = False
Width = 50
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 2
SummaryFooter.Kind = skSum
end
end
inherited mmMain: TMainMenu
inherited miOptions: TMenuItem
object miBandHorzSizing: TMenuItem [0]
Caption = 'Band Horz &Sizing'
Checked = True
Hint = 'Enables horizontal band sizing'
OnClick = miBandHorzSizingClick
end
object miBandVertSizing: TMenuItem [1]
Caption = 'Band &Vert Sizing'
Checked = True
Hint = 'Enables vertical band sizing'
OnClick = miBandVertSizingClick
end
object miBandMoving: TMenuItem [2]
Caption = 'Band &Moving'
Checked = True
Hint = 'Enables band moving'
OnClick = miBandMovingClick
end
object N2: TMenuItem [3]
Caption = '-'
end
object miShowBands: TMenuItem [4]
Caption = 'Show &Bands'
Checked = True
Hint = 'Shows bands within a tree list control'
OnClick = miShowBandsClick
end
object miShowHeaders: TMenuItem [5]
Caption = 'Show &Headers'
Checked = True
Hint = 'Shows column headers within a tree list control'
OnClick = miShowHeadersClick
end
object miColumnCustomization: TMenuItem [6]
Action = actCustomizationForm
end
object miSeparator1: TMenuItem [7]
Caption = '-'
end
object miGridLookFeel: TMenuItem [8]
Caption = '&Look&&Feel'
object miKind: TMenuItem
Caption = '&Kind'
object miFlat: TMenuItem
Caption = '&Flat'
GroupIndex = 1
Hint = 'Setting this option changes the demo appearance to Flat style'
RadioItem = True
OnClick = LookAndFeelChange
end
object miStandard: TMenuItem
Tag = 1
Caption = '&Standard'
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Standard styl' +
'e'
RadioItem = True
OnClick = LookAndFeelChange
end
object miUltraFlat: TMenuItem
Tag = 2
Caption = '&Ultra Flat'
Checked = True
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Ultra Flat st' +
'yle'
RadioItem = True
OnClick = LookAndFeelChange
end
object Office111: TMenuItem
Tag = 3
Caption = 'Office 11'
GroupIndex = 1
RadioItem = True
OnClick = LookAndFeelChange
end
end
object miNativeStyle: TMenuItem
Tag = 4
Caption = '&Native Style'
Hint = 'Setting this option changes the demo appearance to Native style'
OnClick = LookAndFeelChange
end
end
object miSeparator2: TMenuItem [9]
Caption = '-'
end
end
end
inherited alMain: TActionList
object actCustomizationForm: TAction
Category = 'Options'
Caption = '&Customization Form ...'
Hint = 'Shows the column customization form'
OnExecute = actCustomizationFormExecute
end
end
object mnuNodeOptions: TPopupMenu
OnPopup = mnuNodeOptionsPopup
Left = 88
Top = 8
object miFixBand: TMenuItem
Caption = '&Fix Band'
object miFixBandNone: TMenuItem
Caption = '&None'
Hint = 'Makes the band unfixed'
RadioItem = True
OnClick = miFixBandClick
end
object miFixBandLeft: TMenuItem
Tag = 1
Caption = '&Left'
Hint = 'Fixes the band to the left of the TreeList '
RadioItem = True
OnClick = miFixBandClick
end
object miFixBandRight: TMenuItem
Tag = 2
Caption = '&Right'
Hint = 'Fixes the band to the right of the TreeList '
RadioItem = True
OnClick = miFixBandClick
end
end
object miBandHide: TMenuItem
Caption = '&Hide Band'
Hint = 'Hides a selected band'
OnClick = miBandHideClick
end
object CustomisationForm1: TMenuItem
Action = actCustomizationForm
end
end
object cxEditRepository1: TcxEditRepository
Left = 432
Top = 48
object eriTelephoneMaskEdit: TcxEditRepositoryMaskItem
Properties.MaskKind = emkRegExprEx
Properties.EditMask = '(\((\d\d\d)?\))? \d(\d\d?)? - \d\d(\d\d)?( - \d\d)?'
end
object cxEditRepository1TextItem1: TcxEditRepositoryTextItem
Properties.Alignment.Horz = taLeftJustify
Properties.Alignment.Vert = taVCenter
end
object cxEditRepositoryCalcItem: TcxEditRepositoryCalcItem
end
end
end

View File

@ -0,0 +1,95 @@
//---------------------------------------------------------------------------
#ifndef BandedFixedDemoMainH
#define BandedFixedDemoMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxStyles.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include "cxLookAndFeels.hpp"
#include "DemoBasicMain.h"
#include "cxCalc.hpp"
#include "cxDBLookupComboBox.hpp"
#include "cxDBTL.hpp"
#include "cxEditRepositoryItems.hpp"
#include "cxInplaceContainer.hpp"
#include "cxMaskEdit.hpp"
#include "cxTL.hpp"
#include "cxTLData.hpp"
//---------------------------------------------------------------------------
class TBandedFixedDemoMainForm : public TDemoBasicMainForm
{
__published: // IDE-managed Components
TMenuItem *miFlat;
TMenuItem *miUltraFlat;
TMenuItem *miStandard;
TMenuItem *miNativeStyle;
TcxEditRepository *cxEditRepository1;
TcxEditRepositoryMaskItem *eriTelephoneMaskEdit;
TcxEditRepositoryTextItem *cxEditRepository1TextItem1;
TcxEditRepositoryCalcItem *cxEditRepositoryCalcItem;
TcxDBTreeList *cxDBTreeList;
TcxDBTreeListColumn *cxDBTreeListID;
TcxDBTreeListColumn *cxDBTreeListPROJECTID;
TcxDBTreeListColumn *cxDBTreeListProjectManagerID;
TcxDBTreeListColumn *cxDBTreeListEmployee;
TcxDBTreeListColumn *cxDBTreeListEmployeePhone;
TcxDBTreeListColumn *cxDBTreeListEmployeeEmail;
TcxDBTreeListColumn *cxDBTreeListSUNDAY;
TcxDBTreeListColumn *cxDBTreeListMONDAY;
TcxDBTreeListColumn *cxDBTreeListTUESDAY;
TcxDBTreeListColumn *cxDBTreeListWEDNESDAY;
TcxDBTreeListColumn *cxDBTreeListTHURSDAY;
TcxDBTreeListColumn *cxDBTreeListFRIDAY;
TcxDBTreeListColumn *cxDBTreeListSATURDAY;
TcxDBTreeListColumn *cxDBTreeListWeekSum;
TcxDBTreeListColumn *cxDBTreeListWeekAVG;
TPopupMenu *mnuNodeOptions;
TMenuItem *miFixBand;
TMenuItem *miFixBandNone;
TMenuItem *miFixBandLeft;
TMenuItem *miFixBandRight;
TMenuItem *miBandHide;
TMenuItem *CustomisationForm1;
void __fastcall FormShow(TObject *Sender);
void __fastcall LookAndFeelChange(TObject *Sender);
void __fastcall actCustomizationFormExecute(TObject *Sender);
void __fastcall miBandHorzSizingClick(TObject *Sender);
void __fastcall miBandVertSizingClick(TObject *Sender);
void __fastcall miBandMovingClick(TObject *Sender);
void __fastcall mnuNodeOptionsPopup(TObject *Sender);
void __fastcall miBandHideClick(TObject *Sender);
void __fastcall cxDBTreeListStylesGetContentStyle(TObject *Sender,
TObject *AItem, TcxTreeListNode *ANode, TcxStyle *&AStyle);
void __fastcall cxDBTreeListEmployeeGetDisplayText(TcxTreeListColumn *Sender,
TcxTreeListNode *ANode, String &Value);
void __fastcall cxDBTreeListEmployeeGetEditProperties(
TcxTreeListColumn *Sender, TcxTreeListNode *ANode,
TcxCustomEditProperties *&EditProperties);
void __fastcall miShowBandsClick(TObject *Sender);
void __fastcall miShowHeadersClick(TObject *Sender);
void __fastcall miFixBandClick(TObject *Sender);
private:
TcxTreeListBand *FHitBand;
public: // User declarations
__fastcall TBandedFixedDemoMainForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TBandedFixedDemoMainForm *BandedFixedDemoMainForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,42 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USERES("ColumnsMultiEditorsDemo.res");
USEFORM("ColumnsMultiEditorsDemoMain.cpp", ColumnsMultiEditorsDemoMainForm);
USEFORM("ColumnsMultiEditorsDemoData.cpp", ColumnsMultiEditorsDemoDataDM); /* TDataModule: File Type */
USEFORM("..\Common\DemoRating.cpp", DemoRatingForm);
USEFORM("..\Common\DemoBasicAbout.cpp", DemoBasicAboutForm);
USEFORM("..\Common\DemoBasicMain.cpp", DemoBasicMainForm);
USEFORM("ColumnsMultiEditorsDemoPopup.cpp", ColumnsMultiEditorsDemoPopupForm);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->HelpFile = "..\\..\\Help\\EQTreeList4.hlp";
Application->Title = "ExpressQuantumTreeList4 ColumnsMultiEditorsDemo";
Application->CreateForm(__classid(TColumnsMultiEditorsDemoDataDM), &ColumnsMultiEditorsDemoDataDM);
Application->CreateForm(__classid(TColumnsMultiEditorsDemoMainForm), &ColumnsMultiEditorsDemoMainForm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppVCLApplication</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.node" name="name" value="ColumnsMultiEditorsDemo.exe"/>
<property category="build.node" name="sparelibs" value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.1" value="$(SYSDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.2" value="$(USERDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.3" value="NO_WIN32_LEAN_AND_MEAN"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BCB)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.5" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.6" value="..\Common"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BCB)\lib\release"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BCB)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.4" value="$(BCB)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.5" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="."/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="$(LIBRARIES)"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="import32.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="cp32mt.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0w32.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="Memmgr.Lib"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.3" value="$(PACKAGES)"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.4" value="sysinit.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
</optionset>
</project>
</BCBPROJECT>
<Source>
<Source Name="MainSource">ColumnsMultiEditorsDemo.cpp</Source>
</Source>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.10.00"/>
<PROJECT value="ColumnsMultiEditorsDemo.exe"/>
<OBJFILES value="ColumnsMultiEditorsDemo.obj ColumnsMultiEditorsDemoMain.obj ColumnsMultiEditorsDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj ColumnsMultiEditorsDemoPopup.obj"/>
<RESFILES value="ColumnsMultiEditorsDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) ColumnsMultiEditorsDemoMain.dfm ColumnsMultiEditorsDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm ColumnsMultiEditorsDemoPopup.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="ColumnsMultiEditorsDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder10"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder10"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="ColumnsMultiEditorsDemo.exe"/>
<OBJFILES value="ColumnsMultiEditorsDemo.obj ColumnsMultiEditorsDemoMain.obj ColumnsMultiEditorsDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj ColumnsMultiEditorsDemoPopup.obj"/>
<RESFILES value="ColumnsMultiEditorsDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) ColumnsMultiEditorsDemoMain.dfm ColumnsMultiEditorsDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm ColumnsMultiEditorsDemoPopup.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<SPARELIBS value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="ColumnsMultiEditorsDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder5"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder5"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="ColumnsMultiEditorsDemo.exe"/>
<OBJFILES value="ColumnsMultiEditorsDemo.obj ColumnsMultiEditorsDemoMain.obj ColumnsMultiEditorsDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj ColumnsMultiEditorsDemoPopup.obj"/>
<RESFILES value="ColumnsMultiEditorsDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) ColumnsMultiEditorsDemoMain.dfm ColumnsMultiEditorsDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm ColumnsMultiEditorsDemoPopup.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="ColumnsMultiEditorsDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder6"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder6"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,19 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "ColumnsMultiEditorsDemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxStyles"
#pragma link "cxTL"
#pragma resource "*.dfm"
TColumnsMultiEditorsDemoDataDM *ColumnsMultiEditorsDemoDataDM;
//---------------------------------------------------------------------------
__fastcall TColumnsMultiEditorsDemoDataDM::TColumnsMultiEditorsDemoDataDM(TComponent* Owner)
: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,170 @@
object ColumnsMultiEditorsDemoDataDM: TColumnsMultiEditorsDemoDataDM
Left = 310
Top = 163
Height = 229
Width = 325
object Database: TDatabase
Connected = True
DatabaseName = 'DemosDB'
DriverName = 'STANDARD'
Params.Strings = (
'PATH=..\..\Data'
'DEFAULT DRIVER=PARADOX'
'ENABLE BCD=FALSE')
SessionName = 'Default'
Left = 40
Top = 8
end
object tblPersons: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'PERSONS.DB'
Left = 40
Top = 56
object tblPersonsID: TAutoIncField
FieldName = 'ID'
ReadOnly = True
end
object tblPersonsName: TStringField
FieldName = 'Name'
Size = 50
end
end
object dsPersons: TDataSource
DataSet = tblPersons
Left = 40
Top = 104
end
object StyleRepository: TcxStyleRepository
Left = 160
Top = 8
object cxStyle1: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle2: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle3: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clWhite
end
object cxStyle4: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15252642
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = 11032875
end
object cxStyle5: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle6: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15784893
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle7: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle8: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle9: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle10: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 4707838
TextColor = clBlack
end
object cxStyle11: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 15451300
TextColor = clBlack
end
object cxStyle12: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle13: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 16048336
TextColor = clBlack
end
object stlGroupNode: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15253902
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clWhite
end
object stlFixedBand: TcxStyle
AssignedValues = [svColor]
Color = 15322014
end
object TreeListStyleSheetDevExpress: TcxTreeListStyleSheet
Caption = 'DevExpress'
Styles.Background = cxStyle1
Styles.Content = cxStyle5
Styles.Inactive = cxStyle9
Styles.Selection = cxStyle13
Styles.BandBackground = cxStyle2
Styles.BandHeader = cxStyle3
Styles.ColumnHeader = cxStyle4
Styles.ContentEven = cxStyle7
Styles.ContentOdd = cxStyle6
Styles.Footer = cxStyle8
Styles.IncSearch = cxStyle10
Styles.Indicator = cxStyle11
Styles.Preview = cxStyle12
BuiltIn = True
end
end
end

View File

@ -0,0 +1,48 @@
//---------------------------------------------------------------------------
#ifndef ColumnsMultiEditorsDemoDataH
#define ColumnsMultiEditorsDemoDataH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include "cxTL.hpp"
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TColumnsMultiEditorsDemoDataDM : public TDataModule
{
__published: // IDE-managed Components
TDatabase *DataBase;
TTable *tblPersons;
TAutoIncField *tblPersonsID;
TStringField *tblPersonsName;
TDataSource *dsPersons;
TcxStyleRepository *StyleRepository;
TcxStyle *cxStyle1;
TcxStyle *cxStyle2;
TcxStyle *cxStyle3;
TcxStyle *cxStyle4;
TcxStyle *cxStyle5;
TcxStyle *cxStyle6;
TcxStyle *cxStyle7;
TcxStyle *cxStyle8;
TcxStyle *cxStyle9;
TcxStyle *cxStyle10;
TcxStyle *cxStyle11;
TcxStyle *cxStyle12;
TcxStyle *cxStyle13;
TcxStyle *stlGroupNode;
TcxStyle *stlFixedBand;
TcxTreeListStyleSheet *TreeListStyleSheetDevExpress;
private: // User declarations
public: // User declarations
__fastcall TColumnsMultiEditorsDemoDataDM(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TColumnsMultiEditorsDemoDataDM *ColumnsMultiEditorsDemoDataDM;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,321 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#include "..\cxDemosBCB.inc"
#pragma hdrstop
#include "ColumnsMultiEditorsDemoMain.h"
#include "ColumnsMultiEditorsDemoData.h"
#include "ColumnsMultiEditorsDemoPopup.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxData"
#pragma link "cxDBData"
#pragma link "cxEdit"
#pragma link "cxFilter"
#pragma link "cxGraphics"
#pragma link "cxStyles"
#pragma link "cxLookAndFeels"
#pragma link "DemoBasicMain"
#pragma link "cxDBEditRepository"
#pragma link "cxEditRepositoryItems"
#pragma link "cxInplaceContainer"
#pragma link "cxTextEdit"
#pragma link "cxTL"
#pragma link "cxTLData"
#pragma resource "*.dfm"
TColumnsMultiEditorsDemoMainForm *ColumnsMultiEditorsDemoMainForm;
//---------------------------------------------------------------------------
/* TColumnsMultiEditorsDemoDataSource implementation*/
const String ImageFileName = "..\\..\\"
#if BCB6
"Data"
#else
"Data"
#endif
"\\Car.bmp";
const String scxDefaultValueBlobItem = "Please add text here...";
const String scxDefaultValueButtonItem = "Press me...";
const String scxDefaultValueMemoItem =
"Robbins studied drama at UCLA where he graduated with honors in 1981. "
"That same year, he formed the Actors' Gang, an experimental ensemble that"
" expressed radical political observations through the European avant-garde"
" form of theater.";
const String scxDefaultValueMRUItem = "What's your favorite color?";
const String scxDefaultValuePopupItem = "Pop me up...";
const String scxDefaultValueTextItem = "Text";
const String scxDefaultValueMRUItemClick = "You've pressed the MRU Inplace Editor button.";
void TColumnsMultiEditorsDemoDataSource::FillEditorsNames()
{
FEditorNames[(int)etImage] = "Graphic Editor";
FEditorNames[(int)etImageComboBox] = "Image ComboBox Editor";
FEditorNames[(int)etLookupComboBox] = "Lookup ComboBox Editor";
FEditorNames[(int)etMask] = "Advanced Mask Editor";
}
void TColumnsMultiEditorsDemoDataSource::FillEditorsValues()
{
FValues[(int)etBlob] = scxDefaultValueBlobItem;
FValues[(int)etButton] = scxDefaultValueButtonItem;
FValues[(int)etCalc] = 12345;
FValues[(int)etCheckBox] = True;
FValues[(int)etComboBox] = "Green";
FValues[(int)etCurrency] = 555.35;
FValues[(int)etDate] = Date();
FValues[(int)etHyperLink] = "http://www.devexpress.com";
TcxImage *AImage = new TcxImage((TComponent*)NULL);
__try{
AImage->Picture->LoadFromFile(ImageFileName);
FValues[(int)etImage] = AImage->EditValue;
}
__finally{
AImage->Free();
}
FValues[(int)etImageComboBox] = 2;
FValues[(int)etLookupComboBox] = ColumnsMultiEditorsDemoDataDM->tblPersonsID->Value;
FValues[(int)etMask] = "(234)897-235";
FValues[(int)etMemo] = scxDefaultValueMemoItem;
FValues[(int)etMRU] = scxDefaultValueMRUItem;
FValues[(int)etPopup] = scxDefaultValuePopupItem;
FValues[(int)etRadioGroup] = 0;
FValues[(int)etSpinItem] = 10;
FValues[(int)etText] = scxDefaultValueTextItem;
FValues[(int)etTime] = Now();
}
void TColumnsMultiEditorsDemoDataSource::FillEditorsCategories()
{
FCategories[(int)etBlob] = ectBlobs;
FCategories[(int)etButton] = ectStandard;
FCategories[(int)etCalc] = ectPopups;
FCategories[(int)etCheckBox] = ectStandard;
FCategories[(int)etComboBox] = ectComboBoxes;
FCategories[(int)etCurrency] = ectStandard;
FCategories[(int)etDate] = ectPopups;
FCategories[(int)etHyperLink] = ectStandard;
FCategories[(int)etImage] = ectBlobs;
FCategories[(int)etImageComboBox] = ectComboBoxes;
FCategories[(int)etLookupComboBox] = ectComboBoxes;
FCategories[(int)etMask] = ectStandard;
FCategories[(int)etMemo] = ectBlobs;
FCategories[(int)etMRU] = ectComboBoxes;
FCategories[(int)etPopup] = ectPopups;
FCategories[(int)etRadioGroup] = ectStandard;
FCategories[(int)etSpinItem] = ectStandard;
FCategories[(int)etText] = ectStandard;
FCategories[(int)etTime] = ectStandard;
}
__fastcall TColumnsMultiEditorsDemoDataSource::TColumnsMultiEditorsDemoDataSource(
TcxVirtualTreeList *ATreeList, TcxEditRepository *AEditRepository)
{
FTreeList = ATreeList;
FEditRepository = AEditRepository;
FillEditorsNames();
FillEditorsValues();
FillEditorsCategories();
}
//---------------------------------------------------------------------------
int TColumnsMultiEditorsDemoDataSource::RootCount(void)
{
return cxEditorsCategoryCount;
}
//---------------------------------------------------------------------------
Variant __fastcall TColumnsMultiEditorsDemoDataSource::GetKeyValue(
void * ARecordHandle)
{
return (int)ARecordHandle;
}
//---------------------------------------------------------------------------
Variant __fastcall TColumnsMultiEditorsDemoDataSource::GetParentKeyValue(
void * ARecordHandle)
{
int ARecordIndex = (int)ARecordHandle;
if (ARecordIndex < RootCount())
return -1;
else
return (int)FCategories[ARecordIndex - RootCount()];
}
//---------------------------------------------------------------------------
int __fastcall TColumnsMultiEditorsDemoDataSource::GetRecordCount(void)
{
return RootCount() + cxEditorsTypeCount;
}
//---------------------------------------------------------------------------
Variant __fastcall TColumnsMultiEditorsDemoDataSource::GetValue(
void * ARecordHandle, void * AItemHandle)
{
int ARecordIndex = (int)ARecordHandle;
Variant Result;
switch ((int)AItemHandle){
case 0:
if (ARecordIndex < RootCount())
Result = EditorsCategoryNames[ARecordIndex];
else
Result = GetEditorName(ARecordIndex - RootCount());
break;
case 1:
if ((int)ARecordHandle > RootCount() - 1)
Result = GetEditorValue(ARecordIndex - RootCount());
}
return Result;
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoDataSource::SetValue(
void * ARecordHandle, void * AItemHandle, const Variant &AValue)
{
int ARecordIndex = Integer(ARecordHandle);
if ((ARecordIndex > RootCount() - 1) && ((int)AItemHandle == 1))
SetEditorValue(ARecordIndex - RootCount(), AValue);
}
//---------------------------------------------------------------------------
String TColumnsMultiEditorsDemoDataSource::GetEditorName(int AEditorIndex)
{
String Result = FEditorNames[AEditorIndex];
if (Result == ""){
Result = FEditRepository->Items[AEditorIndex]->Name;
Result = Result.SubString(FEditRepository->Name.Length() + 1, Result.Length());
Result = Result.SubString(1, Result.Pos("Item") - 1) + " Editor";
}
return Result;
}
//---------------------------------------------------------------------------
Variant TColumnsMultiEditorsDemoDataSource::GetEditorValue(int AEditorIndex)
{
return FValues[AEditorIndex];
}
//---------------------------------------------------------------------------
void TColumnsMultiEditorsDemoDataSource::SetEditorValue(
int AEditorIndex, const Variant AValue)
{
FValues[AEditorIndex] = AValue;
}
//---------------------------------------------------------------------------
/*TColumnsMultiEditorsDemoMainForm implementation*/
__fastcall TColumnsMultiEditorsDemoMainForm::TColumnsMultiEditorsDemoMainForm(TComponent* Owner)
: TDemoBasicMainForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::FormShow(TObject *Sender)
{
/* remove/add the closing slash on this line to disable/enable the following code *
ShowMessage("WARNING: tutorial not completed-> First, please apply the steps "
"shown in the doc file");
//*/
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::LookAndFeelChange(TObject *Sender)
{
if (((TMenuItem*)Sender)->Tag > 3){
cxLookAndFeelController->NativeStyle =
!cxLookAndFeelController->NativeStyle;
((TMenuItem*)Sender)->Checked = cxLookAndFeelController->NativeStyle;
}
else{
((TMenuItem*)Sender)->Checked = true;
cxLookAndFeelController->Kind = (TcxLookAndFeelKind)((TMenuItem*)Sender)->Tag;
cxLookAndFeelController->NativeStyle = false;
miNativeStyle->Checked = false;
}
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::FormCreate(TObject *Sender)
{
FPopupForm = new TColumnsMultiEditorsDemoPopupForm(NULL);
EditRepositoryPopupItem->Properties->PopupControl = FPopupForm->pnlPopup;
TreeList->DataController->CustomDataSource =
new TColumnsMultiEditorsDemoDataSource(TreeList, EditRepository);
TreeList->FullExpand();
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::FormDestroy(TObject *Sender)
{
FPopupForm->Free();
TreeList->DataController->CustomDataSource->Free();
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::clnSampleGetEditProperties(
TcxTreeListColumn *Sender, TcxTreeListNode *ANode, TcxCustomEditProperties *&EditProperties)
{
/* remove/add the closing slash on this line to disable/enable the following code */
if (GetNodeItemIndex(ANode) < 0) return;
EditProperties = EditRepository->Items[GetNodeItemIndex(ANode)]->Properties;
//*/
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::EditRepositoryButtonItemPropertiesButtonClick(
TObject *Sender, int AButtonIndex)
{
ShowMessage("Press me...");
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::EditRepositoryPopupItemPropertiesInitPopup(
TObject *Sender)
{
FPopupForm->PopupEdit = (TcxPopupEdit*)Sender;
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::TreeListStylesGetContentStyle(
TObject *Sender, TObject *AItem, TcxTreeListNode *ANode, TcxStyle *&AStyle)
{
int AIndex = GetNodeItemIndex(ANode);
if (AIndex < 0)
AStyle = ColumnsMultiEditorsDemoDataDM->stlGroupNode;
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoMainForm::TreeListStylesGetNodeIndentStyle(
TObject *Sender, TcxTreeListNode *ANode, int ALevel, TcxStyle *&AStyle)
{
AStyle = ColumnsMultiEditorsDemoDataDM->cxStyle1;
}
//---------------------------------------------------------------------------
int TColumnsMultiEditorsDemoMainForm::GetNodeItemIndex(TcxTreeListNode *ANode)
{
int res = ((TcxTreeListDataNode*)ANode)->KeyValue;
res = res - RootCount();
return res;
}
//---------------------------------------------------------------------------
int TColumnsMultiEditorsDemoMainForm::RootCount()
{
return ((TColumnsMultiEditorsDemoDataSource*)
TreeList->DataController->CustomDataSource)->RootCount();
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,648 @@
inherited ColumnsMultiEditorsDemoMainForm: TColumnsMultiEditorsDemoMainForm
Left = 276
Top = 91
Caption = 'ExpressQuantumTreeList4 ColumnsMultiEditorsDemo '
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
inherited lscrip: TLabel
Caption =
'This demo shows the ability to edit data by using different edit' +
'ors in one column.'#10#13'See Help/About for other things to try.'
end
inherited memAboutText: TMemo
Lines.Strings = (
'In this demo you can:'
''
'- look at a full-featured set of editors provided for you by Dev' +
'eloper Express Inc.'
''
'- experience with data editing by using different editors in one' +
' column'
''
'- check how little source code required to provide the above fun' +
'ctionality.'
''
'- NOTE: if you haven'#39't done so already, you might like to practi' +
'ce by completing the tutorial version of this demo (see the tuto' +
'rials folder)')
end
object TreeList: TcxVirtualTreeList [3]
Left = 0
Top = 32
Width = 700
Height = 360
Styles.OnGetContentStyle = TreeListStylesGetContentStyle
Styles.StyleSheet = ColumnsMultiEditorsDemoDataDM.TreeListStyleSheetDevExpress
Styles.OnGetNodeIndentStyle = TreeListStylesGetNodeIndentStyle
Align = alClient
Bands = <
item
Caption.Text = 'Inplace Editors'
Width = 542
end>
BufferedPaint = False
OptionsBehavior.AutomateLeftMostIndent = False
OptionsData.Deleting = False
OptionsView.CellAutoHeight = True
OptionsView.CategorizedColumn = clnEditorName
OptionsView.GridLineColor = clBlack
OptionsView.GridLines = tlglBoth
OptionsView.PaintStyle = tlpsCategorized
OptionsView.TreeLineStyle = tllsNone
TabOrder = 2
object clnEditorName: TcxTreeListColumn
Caption.Text = 'Editor Name'
DataBinding.ValueType = 'String'
Options.Editing = False
Width = 241
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
end
object clnSample: TcxTreeListColumn
Caption.Text = 'Sample'
DataBinding.ValueType = 'String'
Width = 301
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
OnGetEditProperties = clnSampleGetEditProperties
end
end
inherited mmMain: TMainMenu
inherited miOptions: TMenuItem
object miGridLookFeel: TMenuItem [0]
Caption = '&Look&&Feel'
object miKind: TMenuItem
Caption = '&Kind'
object miFlat: TMenuItem
Caption = '&Flat'
GroupIndex = 1
Hint = 'Setting this option changes the demo appearance to Flat style'
RadioItem = True
OnClick = LookAndFeelChange
end
object miStandard: TMenuItem
Tag = 1
Caption = '&Standard'
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Standard styl' +
'e'
RadioItem = True
OnClick = LookAndFeelChange
end
object miUltraFlat: TMenuItem
Tag = 2
Caption = '&Ultra Flat'
Checked = True
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Ultra Flat st' +
'yle'
RadioItem = True
OnClick = LookAndFeelChange
end
object Office111: TMenuItem
Tag = 3
Caption = 'Office 11'
GroupIndex = 1
RadioItem = True
OnClick = LookAndFeelChange
end
end
object miNativeStyle: TMenuItem
Tag = 4
Caption = '&Native Style'
Hint = 'Setting this option changes the demo appearance to Native style'
OnClick = LookAndFeelChange
end
end
object miSeparator2: TMenuItem [1]
Caption = '-'
end
end
end
inherited ilMain: TImageList
Bitmap = {
494C010108000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000003000000001002000000000000030
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
000000840000008400000084000000FF00000084000000840000008400000084
0000008400000084000000840000000000000000000000848400008484000084
8400008484000084840000848400008484000084840000848400008484000084
8400008484000084840000848400000000000000000000000000000000000000
FF000000FF000000FF0000000000000000000000000000FFFF0000FFFF0000FF
FF00000000000000000000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
00000084000000FF000000FF000000FF000000FF000000840000008400000084
0000008400000084000000840000000000000000000000848400008484000084
8400008484000084840000848400008484000084840000848400008484000084
84000084840000848400008484000000000000000000000000000000FF000000
FF000000FF000000FF000000FF000000000000FFFF0000FFFF0000FFFF0000FF
FF0000FFFF000000000000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
000000840000008400000084000000FF00000084000000FF0000008400000084
0000008400000084000000840000000000000000000000848400008484000084
8400008484000084840000848400008484000084840000848400008484000084
840000848400008484000084840000000000000000000000FF000000FF000000
FF000000FF000000FF0000848400000000000084840000FFFF0000FFFF0000FF
FF0000FFFF0000FFFF0000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
000000840000008400000084000000FF00000084000000FF0000008400000084
00000084000000840000008400000000000000000000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000FF000000FF000000
FF000000FF000000FF0000848400000000000084840000FFFF0000FFFF0000FF
FF0000FFFF0000FFFF0000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
0000008400000084000000FF000000FF000000FF000000840000008400000084
00000084000000840000008400000000000000000000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000FF000000FF000000
FF000000FF000000FF0000848400000000000084840000FFFF0000FFFF0000FF
FF0000FFFF0000FFFF0000000000000000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF0000000000000000000000000000840000008400000084
00000084000000FF00000084000000FF00000084000000840000008400000084
00000084000000840000008400000000000000000000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000FF000000FF000000
FF000000FF000000FF0000848400000000000084840000FFFF0000FFFF0000FF
FF0000FFFF0000FFFF0000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
00000084000000FF00000084000000FF00000084000000840000008400000084
0000008400000084000000840000000000000000000084000000840000008400
0000840000008400000084000000840000008400000084000000840000008400
000084000000840000008400000000000000000000000000FF000000FF000000
FF000000FF000000FF0000848400000000000084840000FFFF0000FFFF0000FF
FF0000FFFF0000FFFF0000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
0000008400000084000000FF000000FF000000FF000000FF0000008400000084
0000008400000084000000840000000000000000000084000000840000008400
0000840000008400000084000000840000008400000084000000840000008400
00008400000084000000840000000000000000000000000000000000FF000000
FF000000FF000000FF000000FF000000000000FFFF0000FFFF0000FFFF0000FF
FF0000FFFF000000000000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000840000008400000084
000000840000008400000084000000FF00000084000000840000008400000084
0000008400000084000000840000000000000000000084000000840000008400
0000840000008400000084000000840000008400000084000000840000008400
0000840000008400000084000000000000000000000000000000000000000000
FF000000FF000000FF0000000000000000000000000000FFFF0000FFFF0000FF
FF00000000000000000000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000FF000000FF00
0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
0000FF000000FF00000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000080808000808080008080800080808000808080008080
8000808080008080800080808000808080000000000000000000000000008080
8000808080008080800080808000808080008080800080808000808080008080
8000808080008080800080808000808080000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000080808000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
C000C0C0C000C0C0C000C0C0C00080808000000000000000000000000000C0C0
C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
C000C0C0C000C0C0C000C0C0C000808080000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000FFFF00FFFF
FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
FF0000FFFF00FFFFFF0000000000000000000000000000000000000000008080
800080808000FF000000C0C0C000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFF
FF0000FFFF00FFFFFF00C0C0C00080808000000000000000000000000000C0C0
C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080000000000000000000000000000000
0000000000000000000000000000800080008000800080808000000000000000
00000000000000000000000000000000000000000000FFFFFF000000000000FF
FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
FF00FFFFFF0000000000FFFFFF0000000000000000000000000080808000FF00
0000FF000000FF000000C0C0C000FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080000000000000000000FF000000C0C0
C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080000000000000000000000000000000
0000000000008000800080008000FFFFFF00FFFFFF00C0C0C000808080000000
0000000000000000000000000000000000000000000000FFFF00FFFFFF000000
000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
FF0000000000FFFFFF0000FFFF00000000000000000080808000FF000000FF00
0000FF000000FF000000C0C0C000FFFFFF0000FFFF0080808000808080008080
8000C0C0C000FFFFFF00C0C0C0008080800000000000FF000000808080008080
8000808080008080800080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080000000000000000000000000008000
800080008000FFFFFF00FFFFFF000000000000000000C0C0C000C0C0C0008080
80000000000000000000000000000000000000000000FFFFFF0000FFFF00FFFF
FF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
0000FFFFFF0000FFFF00FFFFFF00000000000000000080808000FF000000FF00
0000FF000000FF000000C0C0C000FFFFFF0080808000FF000000FF000000FF00
000080808000FFFFFF00C0C0C0008080800080808000FF000000808080008080
8000FF000000FF000000FF000000FF00000080808000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C00080808000808080008000800080008000FFFF
FF00FFFFFF000000000000000000800080008000800000000000C0C0C000C0C0
C000808080000000000000000000000000000000000000FFFF00FFFFFF000000
0000FFFFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFF
FF0000000000FFFFFF0000FFFF000000000080808000FF000000FF000000FF00
0000FF000000FF000000C0C0C000FFFFFF0080808000C0C0C00080808000FF00
000080808000FFFFFF00C0C0C00080808000808080008080800080808000FF00
0000FF000000C0C0C000C0C0C00080808000FF00000080808000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080008080800080008000FFFFFF000000
000000000000800080008000800080008000800080008000800000000000C0C0
C000C0C0C00080808000000000000000000000000000FFFFFF0000000000FFFF
FF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFFFF00FFFF
FF00FFFFFF0000000000FFFFFF000000000080808000FF000000FF000000FF00
00008080800080808000C0C0C000FFFFFF0080808000FFFFFF00C0C0C0008080
800080808000FFFFFF00C0C0C0008080800080808000C0C0C00080808000FF00
000080808000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080008080800000000000000000008000
800080008000800080000080800000FFFF008000800080008000800080000000
0000C0C0C000C0C0C00080808000000000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00000000000000000080808000FF000000FF0000008080
80008080800080808000C0C0C000FFFFFF0000FFFF0080808000808080008080
8000C0C0C000FFFFFF00C0C0C00080808000000000008080800000FFFF00FF00
0000FF000000FF000000FF000000FF000000FF00000080808000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080008080800080008000800080008000
8000800080008000800080008000008080008000800080008000800080008000
800000000000C0C0C000000000000000000000000000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF000000FFFF
FF00FFFFFF00FFFFFF00FFFFFF000000000080808000FF000000FF0000008080
80008080800080808000C0C0C000FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFF
FF008080800080808000808080008080800000000000000000008080800000FF
FF00FF000000FFFFFF00FFFFFF0080808000FF00000080808000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080000000000080008000FFFFFF008000
80008000800080008000800080008000800000FFFF0000FFFF00800080008000
80008000800000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF000000FF000000FF00
0000FFFFFF00FFFFFF00FFFFFF000000000080808000FF000000FF000000C0C0
C0008080800080808000C0C0C000FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFF
FF00C0C0C000FFFFFF00C0C0C000000000000000000000000000000000008080
800000FFFF00FF000000FF000000FF00000080808000FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C00080808000000000000000000080008000FFFF
FF0080008000800080008000800080008000800080000080800000FFFF0000FF
FF00800080008000800000000000000000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF000000FF000000FFFFFF00FF00
0000FF000000FFFFFF00000000000000000000000000C0C0C000FF000000FF00
0000FFFFFF00C0C0C000C0C0C000FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFF
FF00C0C0C000C0C0C0000000000000000000000000000000000000000000C0C0
C000FF000000FF000000FF00000080808000FFFFFF00FF000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00C0C0C000808080000000000000000000000000008000
8000FFFFFF00800080008000800080008000008080008000800000FFFF0000FF
FF0080008000800080008000800000000000000000000000000000000000FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FF000000FF000000FFFFFF00FFFFFF00FFFF
FF00FF000000FF000000000000000000000000000000C0C0C000FF000000FFFF
FF00C0C0C000FFFFFF00C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
C000C0C0C000808080000000000000000000000000000000000000000000C0C0
C000FFFFFF00FFFFFF00FFFFFF00FF000000FF000000FFFFFF00FFFFFF00FFFF
FF00808080008080800080808000808080000000000000000000000000000000
000080008000FFFFFF00800080008000800000FFFF0000FFFF0000FFFF008000
8000800080008000800000000000000000000000000000000000000000000000
0000FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF0000000000FF000000FF000000000000000000000000000000C0C0C000FF00
0000FF000000C0C0C000FFFFFF00C0C0C0008080800080808000808080008080
800080808000000000000000000000000000000000000000000000000000C0C0
C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00C0C0C000FFFFFF00C0C0C000000000000000000000000000000000000000
00000000000080008000FFFFFF00800080008000800080008000800080008000
8000000000000000000000000000000000000000000000000000000000000000
000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
00000000000000000000FF000000FF000000000000000000000000000000C0C0
C000C0C0C000FF000000FF000000FFFFFF00C0C0C00080808000808080008080
800000000000000000000000000000000000000000000000000000000000C0C0
C000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00C0C0C000C0C0C00000000000000000000000000000000000000000000000
0000000000000000000080008000FFFFFF008000800080008000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
0000000000000000000000000000FF0000000000000000000000000000000000
000000000000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000000000000000
000000000000000000000000000000000000000000000000000000000000C0C0
C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
C000C0C0C0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000800080008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000424D3E000000000000003E000000
2800000040000000300000000100010000000000800100000000000000000000
000000000000000000000000FFFFFF0000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFF800100000000E38F800100000000C10780010000000080038001
0000000001018001000000000101800100000000010180010000000001018001
0000000001018001000000008003800100000000C107800100000000E38F8001
FFFFFFFFFFFF8001FFFFFFFFFFFFFFFFFC00E000FFFF0000F800E000FE3F0000
E000E000F81F0000C000C000E00F000080008000800700008000000000030000
0000000000010000000000000000000000008000000100000000C00080010000
0001E000C00180018003E000E000C0038003E000F000E001C007E001F803F00C
E00FE003FC0FF81EF83FE007FE3FFC3F00000000000000000000000000000000
000000000000}
end
object EditRepository: TcxEditRepository
Left = 136
Top = 88
object EditRepositoryBlobItem: TcxEditRepositoryBlobItem
end
object EditRepositoryButtonItem: TcxEditRepositoryButtonItem
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = EditRepositoryButtonItemPropertiesButtonClick
end
object EditRepositoryCalcItem: TcxEditRepositoryCalcItem
end
object EditRepositoryCheckBoxItem: TcxEditRepositoryCheckBoxItem
end
object EditRepositoryComboBoxItem: TcxEditRepositoryComboBoxItem
Properties.Items.Strings = (
'Blue'
'Green'
'Brown'
'Yellow'
'Red'
'Black')
end
object EditRepositoryCurrencyItem: TcxEditRepositoryCurrencyItem
end
object EditRepositoryDateItem: TcxEditRepositoryDateItem
end
object EditRepositoryHyperLinkItem: TcxEditRepositoryHyperLinkItem
Properties.SingleClick = True
end
object EditRepositoryImageItem: TcxEditRepositoryImageItem
Properties.Stretch = True
end
object EditRepositoryImageComboBoxItem: TcxEditRepositoryImageComboBoxItem
Properties.Images = ilMain
Properties.Items = <
item
Description = 'Cash'
ImageIndex = 4
Value = 1
end
item
Description = 'Visa'
ImageIndex = 5
Value = 2
end
item
Description = 'Master Card'
ImageIndex = 6
Value = 3
end
item
Description = 'American Express'
ImageIndex = 7
Value = 4
end>
end
object EditRepositoryLookupComboBoxItem: TcxEditRepositoryLookupComboBoxItem
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Name'
end>
Properties.ListSource = ColumnsMultiEditorsDemoDataDM.dsPersons
end
object EditRepositoryMaskItem: TcxEditRepositoryMaskItem
Properties.MaskKind = emkRegExprEx
Properties.EditMask = '(\(\d\d\d\))? \d\d\d - \d\d\d\d'
end
object EditRepositoryMemoItem: TcxEditRepositoryMemoItem
end
object EditRepositoryMRUItem: TcxEditRepositoryMRUItem
Properties.LookupItems.Strings = (
'Blue'
'Green'
'Brown'
'Yellow'
'Red'
'Black')
end
object EditRepositoryPopupItem: TcxEditRepositoryPopupItem
Properties.OnInitPopup = EditRepositoryPopupItemPropertiesInitPopup
end
object EditRepositoryRadioGroupItem: TcxEditRepositoryRadioGroupItem
Properties.Columns = 3
Properties.Items = <
item
Caption = 'Cash'
Value = 0
end
item
Caption = 'Visa'
Value = 2
end
item
Caption = 'Master Card'
Value = 1
end>
end
object EditRepositorySpinItem: TcxEditRepositorySpinItem
end
object EditRepositoryTextItem: TcxEditRepositoryTextItem
end
object EditRepositoryTimeItem: TcxEditRepositoryTimeItem
Properties.Use24HourFormat = False
end
end
end

View File

@ -0,0 +1,125 @@
//---------------------------------------------------------------------------
#ifndef ColumnsMultiEditorsDemoMainH
#define ColumnsMultiEditorsDemoMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxStyles.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include "cxLookAndFeels.hpp"
#include "DemoBasicMain.h"
#include "cxDBEditRepository.hpp"
#include "cxEditRepositoryItems.hpp"
#include "cxInplaceContainer.hpp"
#include "cxTextEdit.hpp"
#include "cxTL.hpp"
#include "cxTLData.hpp"
#include "ColumnsMultiEditorsDemoPopup.h"
//---------------------------------------------------------------------------
class TColumnsMultiEditorsDemoMainForm : public TDemoBasicMainForm
{
__published: // IDE-managed Components
TMenuItem *miFlat;
TMenuItem *miUltraFlat;
TMenuItem *miStandard;
TMenuItem *miNativeStyle;
TcxVirtualTreeList *TreeList;
TcxTreeListColumn *clnEditorName;
TcxTreeListColumn *clnSample;
TcxEditRepository *EditRepository;
TcxEditRepositoryBlobItem *EditRepositoryBlobItem;
TcxEditRepositoryButtonItem *EditRepositoryButtonItem;
TcxEditRepositoryCalcItem *EditRepositoryCalcItem;
TcxEditRepositoryCheckBoxItem *EditRepositoryCheckBoxItem;
TcxEditRepositoryComboBoxItem *EditRepositoryComboBoxItem;
TcxEditRepositoryCurrencyItem *EditRepositoryCurrencyItem;
TcxEditRepositoryDateItem *EditRepositoryDateItem;
TcxEditRepositoryHyperLinkItem *EditRepositoryHyperLinkItem;
TcxEditRepositoryImageItem *EditRepositoryImageItem;
TcxEditRepositoryImageComboBoxItem *EditRepositoryImageComboBoxItem;
TcxEditRepositoryLookupComboBoxItem *EditRepositoryLookupComboBoxItem;
TcxEditRepositoryMaskItem *EditRepositoryMaskItem;
TcxEditRepositoryMemoItem *EditRepositoryMemoItem;
TcxEditRepositoryMRUItem *EditRepositoryMRUItem;
TcxEditRepositoryPopupItem *EditRepositoryPopupItem;
TcxEditRepositoryRadioGroupItem *EditRepositoryRadioGroupItem;
TcxEditRepositorySpinItem *EditRepositorySpinItem;
TcxEditRepositoryTextItem *EditRepositoryTextItem;
TcxEditRepositoryTimeItem *EditRepositoryTimeItem;
void __fastcall FormShow(TObject *Sender);
void __fastcall LookAndFeelChange(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
void __fastcall FormDestroy(TObject *Sender);
void __fastcall clnSampleGetEditProperties(TcxTreeListColumn *Sender,
TcxTreeListNode *ANode, TcxCustomEditProperties *&EditProperties);
void __fastcall EditRepositoryButtonItemPropertiesButtonClick(
TObject *Sender, int AButtonIndex);
void __fastcall EditRepositoryPopupItemPropertiesInitPopup(TObject *Sender);
void __fastcall TreeListStylesGetContentStyle(TObject *Sender, TObject *AItem,
TcxTreeListNode *ANode, TcxStyle *&AStyle);
void __fastcall TreeListStylesGetNodeIndentStyle(TObject *Sender,
TcxTreeListNode *ANode, int ALevel, TcxStyle *&AStyle);
private:
TColumnsMultiEditorsDemoPopupForm *FPopupForm;
protected:
int GetNodeItemIndex(TcxTreeListNode *ANode);
int RootCount();
public: // User declarations
__fastcall TColumnsMultiEditorsDemoMainForm(TComponent* Owner);
};
enum TcxEditorsCategoryType { ectStandard, ectComboBoxes, ectBlobs, ectPopups };
const cxEditorsCategoryCount = 4;
const cxEditorsTypeCount = 19;
enum TcxEditorsType { etBlob, etButton, etCalc, etCheckBox, etComboBox, etCurrency,
etDate, etHyperLink, etImage, etImageComboBox, etLookupComboBox, etMask,
etMemo, etMRU, etPopup, etRadioGroup, etSpinItem, etText, etTime };
const String EditorsCategoryNames[cxEditorsCategoryCount] =
{"Standard Editors", "ComboBoxes", "Blobs", "Popups"};
class TColumnsMultiEditorsDemoDataSource : public TcxTreeListCustomDataSource
{
private:
TcxEditRepository *FEditRepository;
Variant FValues[cxEditorsTypeCount];
String FEditorNames[cxEditorsTypeCount];
TcxEditorsCategoryType FCategories[cxEditorsTypeCount];
TcxVirtualTreeList *FTreeList;
String GetEditorName(int AEditorIndex);
Variant GetEditorValue(int AEditorIndex);
void FillEditorsNames();
void FillEditorsValues();
void FillEditorsCategories();
void SetEditorValue(int AEditorIndex, const Variant AValue);
protected:
virtual Variant __fastcall GetKeyValue(void * ARecordHandle);
virtual Variant __fastcall GetParentKeyValue(void * ARecordHandle);
virtual int __fastcall GetRecordCount(void);
virtual Variant __fastcall GetValue(void * ARecordHandle, void * AItemHandle);
virtual void __fastcall SetValue(void * ARecordHandle, void * AItemHandle,
const Variant &AValue);
public:
__fastcall TColumnsMultiEditorsDemoDataSource(TcxVirtualTreeList *ATreeList,
TcxEditRepository *AEditRepository);
int RootCount(void);
};
//---------------------------------------------------------------------------
extern PACKAGE TColumnsMultiEditorsDemoMainForm *ColumnsMultiEditorsDemoMainForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,92 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "ColumnsMultiEditorsDemoPopup.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxGraphics"
#pragma link "cxInplaceContainer"
#pragma link "cxStyles"
#pragma link "cxTextEdit"
#pragma link "cxTL"
#pragma resource "*.dfm"
//---------------------------------------------------------------------------
__fastcall TColumnsMultiEditorsDemoPopupForm::TColumnsMultiEditorsDemoPopupForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoPopupForm::tlPopupGetNodeImageIndex(TObject *Sender,
TcxTreeListNode *ANode, TcxTreeListImageIndexType AIndexType,
TImageIndex &AIndex)
{
if (AIndexType == tlitStateIndex) return;
if (ANode->Level == 0){
AIndex = 0;
if (ANode->Expanded)
AIndex++;
}
else
AIndex = 4;
if (ANode->HotTrack)
if (ANode->Level == 0)
AIndex += 2;
else
AIndex++;
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoPopupForm::tlPopupHotTrackNode(TObject *Sender, TcxTreeListNode *ANode,
TShiftState AShift, TCursor &ACursor)
{
if (ANode->Level == 1)
ACursor = crHandPoint;
else
ACursor = crDefault;
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoPopupForm::tlPopupClick(TObject *Sender)
{
if ((tlPopup->FocusedNode != NULL) && (tlPopup->FocusedNode->Level == 1))
ClosePopupForm(true);
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoPopupForm::tlPopupStylesGetHotTrackStyle(TObject *Sender, TObject *AItem,
TcxTreeListNode *ANode, TcxStyle *&AStyle)
{
if (ANode->Level == 0)
AStyle = stlHotRoot;
else
AStyle = stlHotItem;
}
//---------------------------------------------------------------------------
void __fastcall TColumnsMultiEditorsDemoPopupForm::tlPopupKeyDown(TObject *Sender, Word &Key,
TShiftState Shift)
{
if (Key == VK_ESCAPE)
ClosePopupForm(false);
if (Key == VK_RETURN)
tlPopupClick(NULL);
}
//---------------------------------------------------------------------------
void TColumnsMultiEditorsDemoPopupForm::ClosePopupForm(bool Accept)
{
if (PopupEdit != NULL){
PopupEdit->DroppedDown = false;
if (Accept){
if (tlPopup->FocusedNode != NULL)
PopupEdit->EditingText = tlPopup->FocusedNode->Values[0];
}
}
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,460 @@
object ColumnsMultiEditorsDemoPopupForm: TColumnsMultiEditorsDemoPopupForm
Left = 240
Top = 88
Width = 521
Height = 375
Caption = 'ColumnsMultiEditorsDemoPopupForm'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
PixelsPerInch = 96
TextHeight = 13
object pnlPopup: TPanel
Left = 40
Top = 24
Width = 185
Height = 193
BevelOuter = bvNone
Caption = 'pnlPopup'
TabOrder = 0
object tlPopup: TcxTreeList
Left = 0
Top = 0
Width = 185
Height = 193
Styles.Background = stlContenet
Styles.Content = stlContenet
Styles.HotTrack = stlHotRoot
Styles.OnGetHotTrackStyle = tlPopupStylesGetHotTrackStyle
Align = alClient
Bands = <
item
Caption.AlignHorz = taCenter
Caption.Text = 'Band1'
MinWidth = 30
Width = 250
end>
BufferedPaint = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Images = ilPoupuImages
LookAndFeel.Kind = lfFlat
OptionsBehavior.GoToNextCellOnTab = True
OptionsBehavior.ImmediateEditor = False
OptionsBehavior.AutomateLeftMostIndent = False
OptionsBehavior.DragCollapse = False
OptionsBehavior.ExpandOnIncSearch = True
OptionsBehavior.HotTrack = True
OptionsBehavior.Sorting = False
OptionsBehavior.MultiSort = False
OptionsBehavior.ShowHourGlass = False
OptionsCustomizing.BandCustomizing = False
OptionsCustomizing.BandVertSizing = False
OptionsCustomizing.ColumnCustomizing = False
OptionsCustomizing.ColumnVertSizing = False
OptionsData.Editing = False
OptionsData.Deleting = False
OptionsSelection.CellSelect = False
OptionsSelection.HideSelection = True
OptionsSelection.InvertSelect = False
OptionsView.CellTextMaxLineCount = -1
OptionsView.ShowEditButtons = ecsbFocused
OptionsView.ColumnAutoWidth = True
OptionsView.Headers = False
ParentColor = False
ParentFont = False
Preview.MaxLineCount = 2
TabOrder = 0
OnGetNodeImageIndex = tlPopupGetNodeImageIndex
OnHotTrackNode = tlPopupHotTrackNode
OnClick = tlPopupClick
OnKeyDown = tlPopupKeyDown
Data = {
00000400610200000F00000044617461436F6E74726F6C6C6572310100000012
000000546378537472696E6756616C7565547970651000000000000B00000050
61796D656E745479706500000400000043617368000004000000566973610000
060000004D617374657200000B000000416D2E20457870726573730000080000
00416C69676D656E7400000B0000004C6566744A75737469667900000C000000
52696768744A75737469667900000600000043656E7465720000060000004765
6E6465720000040000004D616C6500000600000046656D616C65000005000000
5374617465000009000000556E636865636B6564000007000000436865636B65
6400000600000047726179656404000000000000000400000004000000000000
0001000000FFFFFFFF01000000100000000000000000000000FFFFFFFF020000
00100000000000000000000000FFFFFFFF030000001000000000000000000000
00FFFFFFFF04000000100000000000000000000000FFFFFFFF05000000040000
00030000000000000001000000FFFFFFFF060000001000000000000000000000
00FFFFFFFF07000000100000000000000000000000FFFFFFFF08000000100000
000000000000000000FFFFFFFF09000000040000000200000000000000010000
00FFFFFFFF0A000000100000000000000000000000FFFFFFFF0B000000100000
000000000000000000FFFFFFFF0C000000040000000300000000000000010000
00FFFFFFFF0D000000100000000000000000000000FFFFFFFF0E000000100000
000000000000000000FFFFFFFF0F000000100000000000000000000000FFFFFF
FF}
object clText: TcxTreeListColumn
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taLeftJustify
Properties.MaxLength = 0
Properties.ReadOnly = False
Caption.Text = 'Name'
DataBinding.ValueType = 'String'
Options.CellEndEllipsis = False
Options.Customizing = False
Options.Editing = False
Options.Moving = False
Options.ShowEditButtons = eisbNever
Options.Sorting = False
Options.TabStop = False
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
Width = 166
end
end
end
object ilPoupuImages: TImageList
DrawingStyle = dsTransparent
Left = 40
Top = 14
Bitmap = {
494C010107000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000003000000001001800000000000024
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000084848400000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000008400000000
000000000000000000000000000000000000000000000000848484C6C6C6C6C6
C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00848484848484848484C6C6C684848400000000000000000000000000000000
000000000000000000000000000000000000840000840000840000FF00008400
000000000000000000000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000008484848484
84FFFFFFC6C6C6FFFFFFC6C6C684848484848400000000000000000000000000
0000000000000000000000008400008400FFFFFF00FF00FFFFFF00FF00008400
008400000000000000000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000848484C6C6C6FFFF
FFC6C6C6FFFFFFC6C6C6C6C6C684848484848484848400000000000000000000
000000000000000000840000FF00FFFFFF00FF00FFFFFF00FF0000FF00008400
008400008400000000000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000848484FFFFFFC6C6
C6FFFFFFC6C6C6FFFFFFC6C6C684848484848484848484848400000000000000
0000000000000000008400FFFFFF00FF00FFFFFF00FF00FFFFFF00FF00008400
008400008400008400000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000848484C6C6C6FFFF
FFFFFFFFC6C6C6C6C6C6C6C6C684848484848484848484848400000000000000
000000000000000000840000FF00FFFFFFFFFFFF00FF0000FF0000FF00008400
008400008400008400000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000848484FFFFFFC6C6
C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C684848484848484848400000000000000
0000000000000000008400FFFFFF00FF0000FF0000FF0000FF0000FF0000FF00
008400008400008400000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000848484C6C6C6C6C6
C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C684848484848400000000000000
000000000000000000840000FF0000FF0000FF0000FF0000FF0000FF0000FF00
00FF00008400008400000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000848484C6C6C6C6C6
C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C684848484848400000000000000
000000000000000000840000FF0000FF0000FF0000FF0000FF0000FF0000FF00
00FF00008400008400000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000848484C6C6
C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C684848484848400000000
000000000000000000000000840000FF0000FF0000FF0000FF0000FF0000FF00
00FF0000FF00008400008400000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C600000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000008484
84C6C6C6C6C6C6C6C6C6C6C6C6C6C6C684848484848400000000000000000000
000000000000000000000000000000840000FF0000FF0000FF0000FF0000FF00
008400008400000000000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00848484C6C6C6C6C6C684848484848400000000000000000000000000000000
000000000000000000000000000000000000840000FF0000FF00008400008400
000000000000000000000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C6FFFFFF84848400000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000084848484848400000000000000000000000000000000000000000000
0000000000000000000000000000000000000000008400008400000000000000
000000000000000000000000000000000000000000000000848484FFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC6C6C684848400000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000008484848484848484
8484848484848484848484848484848484848400000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008C8C8CC6C6C6C6C6C6C6C6C6C6C6
C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C600000000
00000000000000008C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C
8C8C8C8C8C8C8C8C8C8C8C8C0000000000009C9C00CECE63CECE63CECE63CECE
63CECE63CECE63CECE63CECE63CECE63CECE63CECE63CECE63CECE6300000000
00000000000000009C9C009C9C009C9C009C9C009C9C009C9C009C9C009C9C00
9C9C009C9C009C9C009C9C000000000000008C8C8CFFFFFFD6D6D6F7F7F7D6D6
D6F7F7F7D6D6D6F7F7F7D6D6D6F7F7F7D6D6D6D6D6D6D6D6D6C6C6C600000000
00000000000000008C8C8CFFFFFFD6D6D6F7F7F7D6D6D6F7F7F7D6D6D6D6D6D6
D6D6D6D6D6D6C6C6C68C8C8C0000000000009C9C00FFFFCEFFCE9CFFFF9CFFCE
9CFFFF9CFFCE9CFFFF9CFFCE9CFFFF9CFFCE9CFFCE9CFFCE9CCECE6300000000
00000000000000009C9C00FFFFFFFFCE9CFFFF9CFFCE9CFFFF9CFFCE9CFFCE9C
FFCE9CFFCE9CCECE639C9C000000000000008C8C8CFFFFFFF7F7F7F7F7F7F7F7
F7D6D6D6F7F7F7D6D6D6F7F7F7D6D6D6F7F7F7D6D6D6D6D6D6C6C6C600000000
00000000008C8C8CFFFFFFF7F7F7F7F7F7D6D6D6F7F7F7D6D6D6F7F7F7D6D6D6
D6D6D6D6D6D6C6C6C60000008C8C8C0000009C9C00FFFFCEFFFF9CFFFF9CFFFF
9CFFCE9CFFFF9CFFCE9CFFFF9CFFCE9CFFFF9CFFCE9CFFCE9CCECE6300000000
00000000009C9C00FFFFFFFFFF9CFFFF9CFFCE9CFFFF9CFFCE9CFFFF9CFFCE9C
FFCE9CFFCE9CCECE630000009C9C000000008C8C8CFFFFFFF7F7F7F7F7F7F7F7
F7F7F7F7F7F7F7F7F7F7D6D6D6F7F7F7D6D6D6F7F7F7D6D6D6C6C6C600000000
00000000008C8C8CFFFFFFF7F7F7F7F7F7F7F7F7F7F7F7F7F7F7D6D6D6F7F7F7
D6D6D6D6D6D68C8C8C0000008C8C8C0000009C9C00FFFFCEFFFF9CFFFF9CFFFF
9CFFFF9CFFFF9CFFFF9CFFCE9CFFFF9CFFCE9CFFFF9CFFCE9CCECE6300000000
00000000009C9C00FFFFFFFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFCE9CFFFF9C
FFCE9CFFCE9C9C9C000000009C9C000000008C8C8CFFFFFFF7F7F7F7F7F7F7F7
F7F7F7F7F7F7F7D6D6D6F7F7F7D6D6D6F7F7F7D6D6D6F7F7F7C6C6C600000000
00008C8C8CFFFFFFF7F7F7F7F7F7F7F7F7F7F7F7D6D6D6F7F7F7F7F7F7D6D6D6
F7F7F7C6C6C6000000C6C6C6C6C6C60000009C9C00FFFFCEFFFF9CFFFF9CFFFF
9CFFFF9CFFFF9CFFCE9CFFFF9CFFCE9CFFFF9CFFCE9CFFFF9CCECE6300000000
00009C9C00FFFFFFFFFF9CFFFF9CFFFF9CFFFF9CFFCE9CFFFF9CFFFF9CFFCE9C
FFFF9CCECE63000000CECE63CECE630000008C8C8CFFFFFFF7F7F7F7F7F7F7F7
F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7D6D6D6F7F7F7D6D6D6C6C6C600000000
00008C8C8CFFFFFFF7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7D6D6D6F7F7F7
D6D6D6C6C6C6000000C6C6C6C6C6C60000009C9C00FFFFCEFFFF9CFFFF9CFFFF
9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFCE9CFFFF9CFFCE9CCECE6300000000
00009C9C00FFFFFFFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFCE9CFFFF9C
FFCE9CCECE63000000CECE63CECE630000008C8C8CFFFFFFF7F7F7F7F7F7F7F7
F7F7F7F7F7F7F7F7F7F7F7F7F7D6D6D6F7F7F7D6D6D6F7F7F7C6C6C600000000
00008C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C
8C8C8C8C8C8CC6C6C6F7F7F7C6C6C60000009C9C00FFFFCEFFFF9CFFFF9CFFFF
9CFFFF9CFFFF9CFFFF9CFFFF9CFFCE9CFFFF9CFFCE9CFFFF9CCECE6300000000
00009C9C009C9C009C9C009C9C009C9C009C9C009C9C009C9C009C9C009C9C00
9C9C009C9C00CECE63FFFF9CCECE630000008C8C8CFFFFFFF7F7F7F7F7F7F7F7
F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7D6D6D6C6C6C600000000
00000000008C8C8CFFFFFFF7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7
F7F7F7F7F7F7F7F7F7F7F7F7C6C6C60000009C9C00FFFFCEFFFF9CFFFF9CFFFF
9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFCE9CCECE6300000000
00000000009C9C00FFFFFFFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9C
FFFF9CFFFF9CFFFF9CFFFF9CCECE630000008C8C8CFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F7F7C6C6C600000000
00000000008C8C8CFFFFFFF7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7
FFFFFFFFFFFFFFFFFFFFFFFFC6C6C60000009C9C00FFFFCEFFFFCEFFFFCEFFFF
CEFFFFCEFFFFCEFFFFCEFFFFCEFFFFCEFFFFCEFFFFCEFFFF9CCECE6300000000
00000000009C9C00FFFFFFFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFF9C
FFFFFFFFFFFFFFFFFFFFFFFFCECE630000008C8C8CC6C6C6C6C6C6C6C6C6C6C6
C6C6C6C6C6C6C6C6C6C68C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C00000000
00000000008C8C8CFFFFFFF7F7F7F7F7F7F7F7F7F7F7F7F7F7F7FFFFFF8C8C8C
8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C0000009C9C00CECE63CECE63CECE63CECE
63CECE63CECE63CECE639C9C009C9C009C9C009C9C009C9C009C9C0000000000
00000000009C9C00FFFFFFFFFF9CFFFF9CFFFF9CFFFF9CFFFF9CFFFFFF9C9C00
9C9C009C9C009C9C009C9C009C9C000000000000008C8C8CF7F7F7FFFFFFFFFF
FFF7F7F7F7F7F78C8C8C00000000000000000000000000000000000000000000
00000000000000008C8C8CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8C8C8C000000
0000000000000000000000000000000000000000009C9C00F7F7F7FFFFCEFFFF
CEFFFF9CFFFF9C9C9C0000000000000000000000000000000000000000000000
00000000000000009C9C00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9C9C00000000
0000000000000000000000000000000000000000000000008C8C8C8C8C8C8C8C
8C8C8C8C8C8C8C00000000000000000000000000000000000000000000000000
00000000000000000000008C8C8C8C8C8C8C8C8C8C8C8C8C8C8C000000000000
0000000000000000000000000000000000000000000000009C9C009C9C009C9C
009C9C009C9C0000000000000000000000000000000000000000000000000000
00000000000000000000009C9C009C9C009C9C009C9C009C9C00000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000424D3E000000000000003E000000
2800000040000000300000000100010000000000800100000000000000000000
000000000000000000000000FFFFFF0000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FFFFFFFFFFFF0000FFFFFFFFC0030000
FF3FFF3FC0030000F81FF81FC0030000E00FE00FC0030000C007C007C0030000
C003C003C0030000C003C003C0030000C003C003C0030000C003C003C0030000
C003C003C0030000E003E003C0030000F00FF00FC0030000F83FF83FC0070000
FCFFFCFFC00F0000FFFFFFFFC01F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
8001E0008001E0000001C0000001C0000001C0000001C0000001800000018000
0001800000018000000100000001000000010000000100000001000000010000
000180000001800000018000000180000003800100038001807FC07F807FC07F
C0FFE0FFC0FFE0FFFFFFFFFFFFFFFFFF00000000000000000000000000000000
000000000000}
end
object cxStyleRepository1: TcxStyleRepository
Left = 288
Top = 32
object stlHotRoot: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16578029
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsUnderline]
TextColor = clNavy
end
object stlContenet: TcxStyle
AssignedValues = [svColor]
Color = 16578029
end
object stlHotItem: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14917719
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsUnderline]
TextColor = clNavy
end
end
end

View File

@ -0,0 +1,48 @@
//---------------------------------------------------------------------------
#ifndef ColumnsMultiEditorsDemoPopupH
#define ColumnsMultiEditorsDemoPopupH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxGraphics.hpp"
#include "cxInplaceContainer.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "cxTL.hpp"
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
//---------------------------------------------------------------------------
class TColumnsMultiEditorsDemoPopupForm : public TForm
{
__published: // IDE-managed Components
TPanel *pnlPopup;
TcxTreeList *tlPopup;
TcxTreeListColumn *clText;
TImageList *ilPoupuImages;
TcxStyleRepository *cxStyleRepository1;
TcxStyle *stlHotRoot;
TcxStyle *stlContenet;
TcxStyle *stlHotItem;
void __fastcall tlPopupGetNodeImageIndex(TObject *Sender,
TcxTreeListNode *ANode, TcxTreeListImageIndexType AIndexType,
TImageIndex &AIndex);
void __fastcall tlPopupHotTrackNode(TObject *Sender, TcxTreeListNode *ANode,
TShiftState AShift, TCursor &ACursor);
void __fastcall tlPopupClick(TObject *Sender);
void __fastcall tlPopupStylesGetHotTrackStyle(TObject *Sender, TObject *AItem,
TcxTreeListNode *ANode, TcxStyle *&AStyle);
void __fastcall tlPopupKeyDown(TObject *Sender, Word &Key,
TShiftState Shift);
private:
TcxPopupEdit *FPopupEdit;
void ClosePopupForm(bool Accept);
public:
__property TcxPopupEdit *PopupEdit = {read = FPopupEdit, write = FPopupEdit};
__fastcall TColumnsMultiEditorsDemoPopupForm(TComponent* Owner);
};
#endif

View File

@ -0,0 +1,36 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DemoBasicAbout.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxButtons"
#pragma link "cxLookAndFeelPainters"
#pragma resource "*.dfm"
TDemoBasicAboutForm *DemoBasicAboutForm;
//---------------------------------------------------------------------------
__fastcall TDemoBasicAboutForm::TDemoBasicAboutForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicAboutForm::btnOKClick(TObject &Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicAboutForm::FormClose(TObject *Sender, TCloseAction &Action)
{
Action = caFree;
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicAboutForm::FormDestroy(TObject *Sender)
{
DemoBasicAboutForm = NULL;
}
//---------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
//---------------------------------------------------------------------------
#ifndef DemoBasicAboutH
#define DemoBasicAboutH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxButtons.hpp"
#include "cxLookAndFeelPainters.hpp"
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
//---------------------------------------------------------------------------
class TDemoBasicAboutForm : public TForm
{
__published: // IDE-managed Components
TImage *imgIcon;
TLabel *lbCopyright;
TBevel *bvBottom;
TLabel *lbCompanyName;
TRichEdit *reDemoInfo;
TcxButton *btnOK;
TLabel *lmoName;
void __fastcall btnOKClick(TObject &Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall FormDestroy(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TDemoBasicAboutForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TDemoBasicAboutForm *DemoBasicAboutForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,111 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DemoBasicMain.h"
#include "DemoRating.h"
#include "DemoBasicAbout.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxLookAndFeels"
#pragma resource "*.dfm"
TDemoBasicMainForm *DemoBasicMainForm;
//---------------------------------------------------------------------------
__fastcall TDemoBasicMainForm::TDemoBasicMainForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actAboutExecute(TObject *Sender)
{
ShowAbout(true, false);
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actDownloadsExecute(TObject *Sender)
{
ShellExecute(Handle, PChar("OPEN"), PChar("http://www.devexpress.com/downloads"), NULL, NULL, SW_SHOWMAXIMIZED);
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actDXOnTheWebExecute(TObject *Sender)
{
ShellExecute(Handle, PChar("OPEN"), PChar("http://www.devexpress.com"), NULL, NULL, SW_SHOWMAXIMIZED);
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actExitExecute(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actForumExecute(TObject *Sender)
{
ShellExecute(Handle, PChar("OPEN"), PChar("https://www.devexpress.com/ClientCenter"), NULL, NULL, SW_SHOWMAXIMIZED);
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actHelpExecute(TObject *Sender)
{
Application->HelpCommand(HELP_FINDER, 0);
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actProductsExecute(TObject *Sender)
{
ShellExecute(Handle, PChar("OPEN"), PChar("http://www.devexpress.com/products"), NULL, NULL, SW_SHOWMAXIMIZED);
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actRateDemoExecute(TObject *Sender)
{
TDemoRatingForm *AForm = new TDemoRatingForm(this);
__try{
AForm->ShowModal();
}
__finally{
AForm->Free();
}
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actShowDemoDescriptionExecute(TObject *Sender)
{
lscrip->Visible = !lscrip->Visible;
((TCustomAction*)Sender)->Checked = !((TCustomAction*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void TDemoBasicMainForm::AdjustAboutText(TStrings *AAboutText)
{
AAboutText->Assign(memAboutText->Lines);
}
//---------------------------------------------------------------------------
void TDemoBasicMainForm::ShowAbout(bool AModal, bool AOnTop)
{
if (DemoBasicAboutForm == NULL)
DemoBasicAboutForm = new TDemoBasicAboutForm(Application);
AdjustAboutText(DemoBasicAboutForm->reDemoInfo->Lines);
DemoBasicAboutForm->lmoName->Caption = ChangeFileExt(ExtractFileName(Application->ExeName),"");
if (AOnTop)
DemoBasicAboutForm->FormStyle = fsStayOnTop;
else
DemoBasicAboutForm->FormStyle = fsNormal;
if (AModal)
DemoBasicAboutForm->ShowModal();
else
DemoBasicAboutForm->Show();
}
//---------------------------------------------------------------------------
void __fastcall TDemoBasicMainForm::actSupportExecute(TObject *Sender)
{
ShellExecute(Handle, PChar("OPEN"), PChar("http://www.devexpress.com/Support/Center"), NULL, NULL, SW_SHOWMAXIMIZED);
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,499 @@
object DemoBasicMainForm: TDemoBasicMainForm
Left = 246
Top = 145
Width = 708
Height = 465
Caption = 'ExpressQuantumTreeList4 DemoBasic Demo'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Menu = mmMain
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object lscrip: TLabel
Left = 0
Top = 0
Width = 700
Height = 32
Align = alTop
Caption = 'Brief purpose of the demo'#10#13'That'#39's it'
Color = 4707838
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
WordWrap = True
end
object sbMain: TStatusBar
Left = 0
Top = 392
Width = 700
Height = 19
AutoHint = True
Panels = <>
ParentShowHint = False
ShowHint = True
SimplePanel = True
end
object memAboutText: TMemo
Left = 576
Top = 296
Width = 113
Height = 89
TabOrder = 1
Visible = False
WordWrap = False
end
object mmMain: TMainMenu
Images = ilMain
Left = 504
Top = 8
object miFile: TMenuItem
Caption = '&File'
object miExit: TMenuItem
Action = actExit
end
end
object miOptions: TMenuItem
Caption = '&Options'
object miShowDemoDescription: TMenuItem
Action = actShowDemoDescription
Hint = 'Displays the description of the current demo'
end
end
object miHelp: TMenuItem
Caption = '&Help'
object miGridHelp: TMenuItem
Action = actHelp
Caption = 'ExpressQuantumTreeList 4 &Help'
Hint = 'Starts the ExpressQuantumTreeList help system'
end
object miRate: TMenuItem
Action = actRateDemo
end
object miSeparator3: TMenuItem
Caption = '-'
end
object miDeveloperExpressontheweb: TMenuItem
Action = actDXOnTheWeb
end
object miProducts: TMenuItem
Action = actProducts
end
object miDownloads: TMenuItem
Action = actDownloads
end
object miSupport: TMenuItem
Action = actSupport
end
object miForum: TMenuItem
Action = actForum
end
object miSeparator4: TMenuItem
Caption = '-'
end
object miAbout: TMenuItem
Action = actAbout
end
end
end
object ilMain: TImageList
Left = 472
Top = 8
Bitmap = {
494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000003000000001001800000000000024
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000080808080808080808080808080808080808080808080808080808080
8080000000000000000000808080808080808080808080808080808080808080
8080808080808080808080808080808080800000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00808080C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C080
8080000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
C0C0C0C0C0C0C0C0C0C0C0C0C0C0C08080800000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF
00FFFFFFFFFF00FFFFFFFFFF0000000000000000000000000000008080808080
80FF0000C0C0C0FFFFFF00FFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFC0C0C080
8080000000000000000000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C08080800000000000000000000000000000
0000000000000080008080008080808000000000000000000000000000000000
0000000000FFFFFF00000000FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF00FFFF
FFFFFF00FFFFFFFFFF000000FFFFFF000000000000000000808080FF0000FF00
00FF0000C0C0C0FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFC0C0C080
8080000000000000FF0000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C08080800000000000000000000000000000
00800080800080FFFFFFFFFFFFC0C0C080808000000000000000000000000000
000000000000FFFFFFFFFF00000000FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF
00FFFFFFFFFF000000FFFFFF00FFFF000000000000808080FF0000FF0000FF00
00FF0000C0C0C0FFFFFF00FFFF808080808080808080C0C0C0FFFFFFC0C0C080
8080000000FF0000808080808080808080808080808080FFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C08080800000000000000000008000808000
80FFFFFFFFFFFF000000000000C0C0C0C0C0C080808000000000000000000000
0000000000FFFFFF00FFFFFFFFFF00000000FFFFFFFFFF00FFFFFFFFFF00FFFF
FFFFFF000000FFFFFF00FFFFFFFFFF000000000000808080FF0000FF0000FF00
00FF0000C0C0C0FFFFFF808080FF0000FF0000FF0000808080FFFFFFC0C0C080
8080808080FF0000808080808080FF0000FF0000FF0000FF0000808080FFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C0808080808080800080800080FFFFFFFFFF
FF000000000000800080800080000000C0C0C0C0C0C080808000000000000000
000000000000FFFFFFFFFF000000FFFFFF00000000FFFFFFFFFF00FFFFFFFFFF
000000FFFFFF000000FFFFFF00FFFF000000808080FF0000FF0000FF0000FF00
00FF0000C0C0C0FFFFFF808080C0C0C0808080FF0000808080FFFFFFC0C0C080
8080808080808080808080FF0000FF0000C0C0C0C0C0C0808080FF0000808080
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C0808080808080800080FFFFFF0000000000
00800080800080800080800080800080000000C0C0C0C0C0C080808000000000
0000000000FFFFFF000000FFFFFFFFFFFFFFFFFF000000000000000000000000
FFFFFFFFFFFFFFFFFF000000FFFFFF000000808080FF0000FF0000FF00008080
80808080C0C0C0FFFFFF808080FFFFFFC0C0C0808080808080FFFFFFC0C0C080
8080808080C0C0C0808080FF0000808080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C08080808080800000000000008000808000
8080008000808000FFFF800080800080800080000000C0C0C0C0C0C080808000
0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFF000000000000808080FF0000FF00008080808080
80808080C0C0C0FFFFFF00FFFF808080808080808080C0C0C0FFFFFFC0C0C080
808000000080808000FFFFFF0000FF0000FF0000FF0000FF0000FF0000808080
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C08080808080808000808000808000808000
80800080800080008080800080800080800080800080000000C0C0C000000000
0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FF0000FFFFFFFFFFFFFFFFFFFFFFFF000000808080FF0000FF00008080808080
80808080C0C0C0FFFFFFFFFFFFFFFFFF00FFFFFFFFFF80808080808080808080
808000000000000080808000FFFFFF0000FFFFFFFFFFFF808080FF0000808080
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C0808080000000800080FFFFFF8000808000
8080008080008080008000FFFF00FFFF80008080008080008000000000000000
0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000
FF0000FF0000FFFFFFFFFFFFFFFFFF000000808080FF0000FF0000C0C0C08080
80808080C0C0C0FFFFFF00FFFFFFFFFFFFFFFFFFFFFFC0C0C0FFFFFFC0C0C000
000000000000000000000080808000FFFFFF0000FF0000FF0000808080FFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C0808080000000000000800080FFFFFF8000
8080008080008080008080008000808000FFFF00FFFF80008080008000000000
0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FF0000
FFFFFFFF0000FF0000FFFFFF000000000000000000C0C0C0FF0000FF0000FFFF
FFC0C0C0C0C0C0FFFFFFFFFFFFFFFFFF00FFFFFFFFFFC0C0C0C0C0C000000000
0000000000000000000000C0C0C0FF0000FF0000FF0000808080FFFFFFFF0000
FFFFFFFFFFFFFFFFFFFFFFFFC0C0C0808080000000000000000000800080FFFF
FF80008080008080008000808080008000FFFF00FFFF80008080008080008000
0000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF0000FF0000FFFFFF
FFFFFFFFFFFFFF0000FF0000000000000000000000C0C0C0FF0000FFFFFFC0C0
C0FFFFFFC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C080808000000000
0000000000000000000000C0C0C0FFFFFFFFFFFFFFFFFFFF0000FF0000FFFFFF
FFFFFFFFFFFF8080808080808080808080800000000000000000000000008000
80FFFFFF80008080008000FFFF00FFFF00FFFF80008080008080008000000000
0000000000000000000000000000FFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFF
FFFFFFFFFFFF000000FF0000FF0000000000000000000000C0C0C0FF0000FF00
00C0C0C0FFFFFFC0C0C080808080808080808080808080808000000000000000
0000000000000000000000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFC0C0C0FFFFFFC0C0C00000000000000000000000000000000000
00800080FFFFFF80008080008080008080008080008000000000000000000000
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFF000000000000000000FF0000FF0000000000000000000000C0C0C0C0C0
C0FF0000FF0000FFFFFFC0C0C080808080808080808000000000000000000000
0000000000000000000000C0C0C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFC0C0C0C0C0C00000000000000000000000000000000000000000
00000000800080FFFFFF80008080008000000000000000000000000000000000
0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF
000000000000000000000000000000FF00000000000000000000000000000000
00C0C0C0C0C0C0C0C0C0C0C0C0C0C0C000000000000000000000000000000000
0000000000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
C0C0C0C0C0C0C0C0C00000000000000000000000000000000000000000000000
0000000000000080008080008000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000424D3E000000000000003E000000
2800000040000000300000000100010000000000800100000000000000000000
000000000000000000000000FFFFFF0000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FC00E000FFFF0000F800E000FE3F0000
E000E000F81F0000C000C000E00F000080008000800700008000000000030000
0000000000010000000000000000000000008000000100000000C00080010000
0001E000C00180018003E000E000C0038003E000F000E001C007E001F803F00C
E00FE003FC0FF81EF83FE007FE3FFC3F00000000000000000000000000000000
000000000000}
end
object alMain: TActionList
Images = ilMain
Left = 440
Top = 8
object actHelp: TAction
Category = 'Help'
Caption = 'ExpressQuantumGrid 4 &Help'
Hint = 'Starts the ExpressQuantumGrid help system'
ImageIndex = 2
OnExecute = actHelpExecute
end
object actDownloads: TAction
Category = 'Help'
Caption = 'Developer Express &Downloads'
Hint =
'Launches the webpage with the list of available downloads of De' +
'veloper Express products'
ImageIndex = 1
OnExecute = actDownloadsExecute
end
object actForum: TAction
Category = 'Help'
Caption = 'DevExpress Client C&enter'
Hint = 'Launches the Developer Express Client Center webpage'
ImageIndex = 1
OnExecute = actForumExecute
end
object actDXOnTheWeb: TAction
Category = 'Help'
Caption = 'Developer Express on the &Web'
Hint = 'Launches the official website of Developer Express'
ImageIndex = 0
OnExecute = actDXOnTheWebExecute
end
object actProducts: TAction
Category = 'Help'
Caption = 'Developer Express &Products'
Hint =
'Launches the webpage with the list of Developer Express product' +
's'
ImageIndex = 1
OnExecute = actProductsExecute
end
object actAbout: TAction
Category = 'Help'
Caption = '&About this demo'
Hint = 'Displays the brief description of the current demo features'
OnExecute = actAboutExecute
end
object actExit: TAction
Category = 'File'
Caption = 'E&xit'
Hint = 'Press to quit the demo-program'
ShortCut = 32856
OnExecute = actExitExecute
end
object actShowDemoDescription: TAction
Category = 'Options'
Caption = '&Show Demo Description'
Checked = True
Hint = 'Display the description of the current demo'
OnExecute = actShowDemoDescriptionExecute
end
object actRateDemo: TAction
Caption = '&Rate this demo...'
Hint = 'Send feedback to Developer Express'
ImageIndex = 3
OnExecute = actRateDemoExecute
end
object actSupport: TAction
Category = 'Help'
Caption = 'DevExpress Support &Center'
Hint = 'Launches the webpage with the Developer Express Support Center'
ImageIndex = 1
OnExecute = actSupportExecute
end
end
object cxLookAndFeelController: TcxLookAndFeelController
Left = 392
Top = 8
end
end

View File

@ -0,0 +1,72 @@
//---------------------------------------------------------------------------
#ifndef DemoBasicMainH
#define DemoBasicMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxLookAndFeels.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
//---------------------------------------------------------------------------
class TDemoBasicMainForm : public TForm
{
__published: // IDE-managed Components
TStatusBar *sbMain;
TMemo *memAboutText;
TMainMenu *mmMain;
TMenuItem *miFile;
TMenuItem *miExit;
TMenuItem *miOptions;
TMenuItem *miShowDemoDescription;
TMenuItem *miHelp;
TMenuItem *miGridHelp;
TMenuItem *miRate;
TMenuItem *miSeparator3;
TMenuItem *miProducts;
TMenuItem *miDownloads;
TMenuItem *miForum;
TMenuItem *miDeveloperExpressontheweb;
TMenuItem *miSeparator4;
TMenuItem *miSupport;
TMenuItem *miAbout;
TImageList *ilMain;
TActionList *alMain;
TAction *actHelp;
TAction *actDownloads;
TAction *actForum;
TAction *actDXOnTheWeb;
TAction *actProducts;
TAction *actAbout;
TAction *actExit;
TAction *actShowDemoDescription;
TAction *actSupport;
TAction *actRateDemo;
TcxLookAndFeelController *cxLookAndFeelController;
TLabel *lscrip;
void __fastcall actAboutExecute(TObject *Sender);
void __fastcall actDownloadsExecute(TObject *Sender);
void __fastcall actDXOnTheWebExecute(TObject *Sender);
void __fastcall actExitExecute(TObject *Sender);
void __fastcall actForumExecute(TObject *Sender);
void __fastcall actHelpExecute(TObject *Sender);
void __fastcall actProductsExecute(TObject *Sender);
void __fastcall actRateDemoExecute(TObject *Sender);
void __fastcall actShowDemoDescriptionExecute(TObject *Sender);
void __fastcall actSupportExecute(TObject *Sender);
protected:
void AdjustAboutText(TStrings *AAboutText);
void ShowAbout(bool AModal, bool AOnTop);
private: // User declarations
public: // User declarations
__fastcall TDemoBasicMainForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TDemoBasicMainForm *DemoBasicMainForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,74 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DemoRating.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxButtons"
#pragma link "cxContainer"
#pragma link "cxControls"
#pragma link "cxEdit"
#pragma link "cxLookAndFeelPainters"
#pragma link "cxMemo"
#pragma link "cxRadioGroup"
#pragma link "cxTextEdit"
#pragma resource "*.dfm"
TDemoRatingForm *DemoRatingForm;
const String OurEmail = "Support@devexpress.com";
const String EmailSubj = "EQTreeList4.Demos.";
//---------------------------------------------------------------------------
__fastcall TDemoRatingForm::TDemoRatingForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TDemoRatingForm::AdjustMessageBody(String &ABody, String ASearchStr, String AReplaceStr)
{
int APos = ABody.Pos(ASearchStr);
while (APos != 0) {
ABody.Delete(APos, ASearchStr.Length());
ABody.Insert(AReplaceStr, APos);
APos = ABody.Pos(ASearchStr);
}
}
//---------------------------------------------------------------------------
void __fastcall TDemoRatingForm::btnSendClick(TObject *Sender)
{
Screen->Cursor = crHourGlass;
try {
String ABody, ASubj;
ASubj = EmailSubj + ChangeFileExt(ExtractFileName(Application->ExeName),"")+"-user%20rating";
ABody = "Rate: " + IntToStr(rgRate->ItemIndex + 1);
if (memRateDescrip->Text != "")
ABody = ABody+"\r\n"+"\r\n"+"Description:"+ "\r\n" + memRateDescrip->Text;
AdjustMessageBody(ABody, "%", "$prc$");
AdjustMessageBody(ABody, "$prc$", "%25");
AdjustMessageBody(ABody, "\r\n", "%0D%0A");
AdjustMessageBody(ABody, "&", "%26");
AdjustMessageBody(ABody, " ", "%20");
String s = "mailto:" + OurEmail + "?subject="+ASubj+"&body="+ABody;
ShellExecute(Handle, "OPEN", s.c_str(), NULL, NULL, SW_SHOWMAXIMIZED);
}
__finally {
Screen->Cursor = crDefault;
Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TDemoRatingForm::rgRatePropertiesChange(TObject *Sender)
{
if (rgRate->ItemIndex != -1)
btnSend->Enabled = true;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,107 @@
object DemoRatingForm: TDemoRatingForm
Left = 316
Top = 224
Width = 323
Height = 292
Caption = 'The Demo rating '
Color = 15451300
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 16
Width = 256
Height = 13
Caption = 'How would you rate the quality of this demo?'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label2: TLabel
Left = 8
Top = 48
Width = 22
Height = 13
Caption = 'Poor'
end
object Label3: TLabel
Left = 248
Top = 48
Width = 43
Height = 13
Caption = 'Excellent'
end
object Label4: TLabel
Left = 8
Top = 80
Width = 263
Height = 13
Caption = 'Tell us your opinion about this demo (optional)'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object rgRate: TcxRadioGroup
Left = 48
Top = 36
Width = 193
Height = 32
Properties.Columns = 5
Properties.Items = <
item
Caption = '1'
end
item
Caption = '2'
end
item
Caption = '3'
end
item
Caption = '4'
end
item
Caption = '5'
end>
Properties.OnChange = rgRatePropertiesChange
Style.BorderStyle = ebsNone
Style.Edges = []
Style.LookAndFeel.NativeStyle = True
TabOrder = 0
Caption = ''
end
object memRateDescrip: TcxMemo
Left = 8
Top = 96
Width = 297
Height = 121
Properties.ScrollBars = ssVertical
Style.Color = 16247513
Style.LookAndFeel.NativeStyle = True
TabOrder = 1
end
object btnSend: TcxButton
Left = 232
Top = 224
Width = 75
Height = 25
Caption = 'Send'
Enabled = False
ModalResult = 1
TabOrder = 2
OnClick = btnSendClick
LookAndFeel.NativeStyle = True
end
end

View File

@ -0,0 +1,40 @@
//---------------------------------------------------------------------------
#ifndef DemoRatingH
#define DemoRatingH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include "cxButtons.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxEdit.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxMemo.hpp"
#include "cxRadioGroup.hpp"
#include "cxTextEdit.hpp"
//---------------------------------------------------------------------------
class TDemoRatingForm : public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
TLabel *Label2;
TLabel *Label3;
TLabel *Label4;
TcxMemo *memRateDescrip;
TcxButton *btnSend;
TcxRadioGroup *rgRate;
void __fastcall btnSendClick(TObject *Sender);
void __fastcall rgRatePropertiesChange(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TDemoRatingForm(TComponent* Owner);
void __fastcall AdjustMessageBody(String &ABody, String ASearchStr, String AReplaceStr);
};
//---------------------------------------------------------------------------
extern PACKAGE TDemoRatingForm *DemoRatingForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,41 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USERES("ConvertTreeList3Demo.res");
USEFORM("ConvertTreeList3DemoMain.cpp", ConvertTreeList3DemoMainForm);
USEFORM("ConvertTreeList3DemoData.cpp", ConvertTreeList3DemoDataDM); /* TDataModule: File Type */
USEFORM("..\Common\DemoRating.cpp", DemoRatingForm);
USEFORM("..\Common\DemoBasicAbout.cpp", DemoBasicAboutForm);
USEFORM("..\Common\DemoBasicMain.cpp", DemoBasicMainForm);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->HelpFile = "..\\..\\Help\\EQTreeList4.hlp";
Application->Title = "ExpressQuantumTreeList4 ConvertTreeList3Demo";
Application->CreateForm(__classid(TConvertTreeList3DemoDataDM), &ConvertTreeList3DemoDataDM);
Application->CreateForm(__classid(TConvertTreeList3DemoMainForm), &ConvertTreeList3DemoMainForm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppVCLApplication</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.node" name="name" value="ConvertTreeList3Demo.exe"/>
<property category="build.node" name="sparelibs" value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib dxEdtrC10.lib dxcomnc10.lib EQTLC4.lib ECQDBCC4.lib dxDBEdC10.lib EQDBTLC4.lib "/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.1" value="$(SYSDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.2" value="$(USERDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.3" value="NO_WIN32_LEAN_AND_MEAN"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BCB)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.5" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.6" value="..\Common"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BCB)\lib\release"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BCB)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.4" value="$(BCB)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.5" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="."/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="$(LIBRARIES)"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="import32.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="cp32mt.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0w32.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="Memmgr.Lib"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.3" value="$(PACKAGES)"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.4" value="sysinit.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
</optionset>
</project>
</BCBPROJECT>
<Source>
<Source Name="MainSource">ConvertTreeList3Demo.cpp</Source>
</Source>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.10.00"/>
<PROJECT value="ConvertTreeList3Demo.exe"/>
<OBJFILES value="ConvertTreeList3Demo.obj ConvertTreeList3DemoMain.obj ConvertTreeList3DemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj"/>
<RESFILES value="ConvertTreeList3Demo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) ConvertTreeList3DemoMain.dfm ConvertTreeList3DemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib dxEdtrC10.lib dxcomnc10.lib EQTLC4.lib ECQDBCC4.lib dxDBEdC10.lib EQDBTLC4.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib dxEdtrC10.lib dxcomnc10.lib EQTLC4.lib ECQDBCC4.lib dxDBEdC10.lib EQDBTLC4.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="ConvertTreeList3Demo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder10"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder10"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="ConvertTreeList3Demo.exe"/>
<OBJFILES value="ConvertTreeList3Demo.obj ConvertTreeList3DemoMain.obj ConvertTreeList3DemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj"/>
<RESFILES value="ConvertTreeList3Demo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) ConvertTreeList3DemoMain.dfm ConvertTreeList3DemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib dxedtrc5.lib dxcomnc5.lib eqtlc5.lib ecqdbcc5.lib dxdbedc5.lib eqdbtlc5.lib "/>
<SPARELIBS value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib dxedtrc5.lib dxcomnc5.lib eqtlc5.lib ecqdbcc5.lib dxdbedc5.lib eqdbtlc5.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="ConvertTreeList3Demo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder5"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder5"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="ConvertTreeList3Demo.exe"/>
<OBJFILES value="ConvertTreeList3Demo.obj ConvertTreeList3DemoMain.obj ConvertTreeList3DemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj"/>
<RESFILES value="ConvertTreeList3Demo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) ConvertTreeList3DemoMain.dfm ConvertTreeList3DemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib dxedtrc6.lib dxcomnc6.lib eqtlc6.lib ecqdbcc6.lib dxdbedc6.lib eqdbtlc6.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib dxedtrc6.lib dxcomnc6.lib eqtlc6.lib ecqdbcc6.lib dxdbedc6.lib eqdbtlc6.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="ConvertTreeList3Demo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder6"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder6"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,18 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "ConvertTreeList3DemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxStyles"
#pragma resource "*.dfm"
TConvertTreeList3DemoDataDM *ConvertTreeList3DemoDataDM;
//---------------------------------------------------------------------------
__fastcall TConvertTreeList3DemoDataDM::TConvertTreeList3DemoDataDM(TComponent* Owner)
: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,68 @@
object ConvertTreeList3DemoDataDM: TConvertTreeList3DemoDataDM
Left = 310
Top = 163
Height = 229
Width = 325
object Database: TDatabase
Connected = True
DatabaseName = 'DemosDB'
DriverName = 'STANDARD'
Params.Strings = (
'PATH=..\..\Data'
'DEFAULT DRIVER=PARADOX'
'ENABLE BCD=FALSE')
SessionName = 'Default'
Left = 40
Top = 8
end
object tblDepartments: TTable
Active = True
DatabaseName = 'DemosDB'
IndexName = 'xParentID'
TableName = 'DEPARTMENTS.DB'
Left = 40
Top = 64
object tblDepartmentsID: TAutoIncField
FieldName = 'ID'
ReadOnly = True
end
object tblDepartmentsPARENTID: TIntegerField
FieldName = 'PARENTID'
end
object tblDepartmentsMANAGERID: TIntegerField
FieldName = 'MANAGERID'
end
object tblDepartmentsNAME: TStringField
FieldName = 'NAME'
Size = 50
end
object tblDepartmentsBUDGET: TFloatField
FieldName = 'BUDGET'
currency = True
end
object tblDepartmentsLOCATION: TStringField
FieldName = 'LOCATION'
Size = 50
end
object tblDepartmentsPHONE: TStringField
FieldName = 'PHONE'
Size = 50
end
object tblDepartmentsFAX: TStringField
FieldName = 'FAX'
Size = 50
end
object tblDepartmentsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 255
end
object tblDepartmentsVACANCY: TBooleanField
FieldName = 'VACANCY'
end
end
object dsDepartments: TDataSource
DataSet = tblDepartments
Left = 40
Top = 112
end
end

View File

@ -0,0 +1,38 @@
//---------------------------------------------------------------------------
#ifndef ConvertTreeList3DemoDataH
#define ConvertTreeList3DemoDataH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TConvertTreeList3DemoDataDM : public TDataModule
{
__published: // IDE-managed Components
TDatabase *DataBase;
TTable *tblDepartments;
TAutoIncField *tblDepartmentsID;
TIntegerField *tblDepartmentsPARENTID;
TIntegerField *tblDepartmentsMANAGERID;
TStringField *tblDepartmentsNAME;
TFloatField *tblDepartmentsBUDGET;
TStringField *tblDepartmentsLOCATION;
TStringField *tblDepartmentsPHONE;
TStringField *tblDepartmentsFAX;
TStringField *tblDepartmentsEMAIL;
TBooleanField *tblDepartmentsVACANCY;
TDataSource *dsDepartments;
private: // User declarations
public: // User declarations
__fastcall TConvertTreeList3DemoDataDM(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TConvertTreeList3DemoDataDM *ConvertTreeList3DemoDataDM;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,57 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "ConvertTreeList3DemoMain.h"
#include "ConvertTreeList3DemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxData"
#pragma link "cxDBData"
#pragma link "cxEdit"
#pragma link "cxFilter"
#pragma link "cxGraphics"
#pragma link "cxStyles"
#pragma link "cxLookAndFeels"
#pragma link "DemoBasicMain"
#pragma link "cxCalc"
#pragma link "cxCheckBox"
#pragma link "cxDBTL"
#pragma link "cxHyperLinkEdit"
#pragma link "cxInplaceContainer"
#pragma link "cxMaskEdit"
#pragma link "cxTextEdit"
#pragma link "cxTL"
#pragma link "cxTLData"
#pragma link "dxCntner"
#pragma link "dxDBCtrl"
#pragma link "dxDBTL"
#pragma link "dxDBTLCl"
#pragma link "dxExEdtr"
#pragma link "dxTL"
#pragma resource "*.dfm"
TConvertTreeList3DemoMainForm *ConvertTreeList3DemoMainForm;
//---------------------------------------------------------------------------
__fastcall TConvertTreeList3DemoMainForm::TConvertTreeList3DemoMainForm(TComponent* Owner)
: TDemoBasicMainForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TConvertTreeList3DemoMainForm::FormShow(TObject *Sender)
{
/* remove/add the closing slash on this line to disable/enable the following code *
ShowMessage("WARNING: tutorial not completed. First, please apply the steps "
"shown in the doc file");
//*/
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,396 @@
inherited ConvertTreeList3DemoMainForm: TConvertTreeList3DemoMainForm
Left = 199
Top = 14
Width = 722
Height = 643
Caption = 'ExpressQuantumTreeList4 ConvertTreeList3Demo'
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
inherited lscrip: TLabel
Width = 714
Height = 25
AutoSize = False
Caption =
'Comparison of QuantumTreeList 3 && 4. See Help/About for more d' +
'etails'
end
inherited sbMain: TStatusBar
Top = 570
Width = 714
end
inherited memAboutText: TMemo
Lines.Strings = (
'This demo compares the input and output of our QuantumTreeList /' +
'QuantumTreeList 4 conversion component (for design time use).'
''
'If you haven'#39't done so already, visit the tutorial version of th' +
'is demo to see just how quick and easy it is to use (see the tut' +
'orials folder)')
end
object pnlEQTL3Descrip: TPanel [3]
Left = 0
Top = 25
Width = 714
Height = 25
Align = alTop
Caption = 'Developer Express QuantumTreeList 3'
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
end
object pnlEQTL4Descrip: TPanel [4]
Left = 0
Top = 282
Width = 714
Height = 24
Align = alTop
Caption = 'Developer Express QuantumTreeList 4 '
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 3
end
object dxDBTreeList: TdxDBTreeList [5]
Left = 0
Top = 50
Width = 714
Height = 232
Bands = <
item
Width = 1000
end>
DefaultLayout = False
HeaderPanelRowCount = 1
KeyField = 'ID'
ParentField = 'PARENTID'
Align = alTop
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 4
BandFont.Charset = DEFAULT_CHARSET
BandFont.Color = clWindowText
BandFont.Height = -11
BandFont.Name = 'MS Sans Serif'
BandFont.Style = []
DataSource = ConvertTreeList3DemoDataDM.dsDepartments
GridLineColor = 15916479
GroupNodeColor = 16247513
GroupNodeTextColor = clBlack
HeaderColor = 15252642
HeaderFont.Charset = DEFAULT_CHARSET
HeaderFont.Color = 11032875
HeaderFont.Height = -11
HeaderFont.Name = 'MS Sans Serif'
HeaderFont.Style = [fsBold]
HideSelectionColor = 15451300
LookAndFeel = lfUltraFlat
OptionsDB = [etoCancelOnExit, etoCanDelete, etoCanNavigation, etoCheckHasChildren, etoConfirmDelete, etoLoadAllRecords]
OptionsView = [etoBandHeaderWidth, etoIndicator, etoUseBitmap, etoUseImageIndexForSelected]
PreviewFont.Charset = DEFAULT_CHARSET
PreviewFont.Color = clBlue
PreviewFont.Height = -11
PreviewFont.Name = 'MS Sans Serif'
PreviewFont.Style = []
PreviewLines = 1
ShowFooter = True
ShowGrid = True
TreeLineColor = clGrayText
object dxDBTreeListID: TdxDBTreeListMaskColumn
Visible = False
Width = 45
BandIndex = 0
RowIndex = 0
FieldName = 'ID'
end
object dxDBTreeListPARENTID: TdxDBTreeListMaskColumn
Visible = False
Width = 162
BandIndex = 0
RowIndex = 0
FieldName = 'PARENTID'
end
object dxDBTreeListNAME: TdxDBTreeListColumn
Sorted = csDown
Width = 230
BandIndex = 0
RowIndex = 0
FieldName = 'NAME'
end
object dxDBTreeListBUDGET: TdxDBTreeListCalcColumn
Width = 105
BandIndex = 0
RowIndex = 0
FieldName = 'BUDGET'
SummaryFooterType = cstSum
SummaryFooterField = 'BUDGET'
end
object dxDBTreeListPHONE: TdxDBTreeListColumn
Width = 127
BandIndex = 0
RowIndex = 0
FieldName = 'PHONE'
end
object dxDBTreeListFAX: TdxDBTreeListColumn
Width = 107
BandIndex = 0
RowIndex = 0
FieldName = 'FAX'
end
object dxDBTreeListEMAIL: TdxDBTreeListHyperLinkColumn
Width = 159
BandIndex = 0
RowIndex = 0
FieldName = 'EMAIL'
end
object dxDBTreeListVACANCY: TdxDBTreeListCheckColumn
Width = 65
BandIndex = 0
RowIndex = 0
FieldName = 'VACANCY'
ValueChecked = 'True'
ValueUnchecked = 'False'
end
end
object pnlTreeList4Container: TPanel [6]
Left = 0
Top = 306
Width = 714
Height = 264
Align = alClient
BevelOuter = bvNone
Caption = 'pnlTreeList4Container'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 5
object cxDBTreeList: TcxDBTreeList
Left = 0
Top = 0
Width = 714
Height = 264
Styles.Background = cxStyle12
Styles.Content = cxStyle6
Styles.Inactive = cxStyle9
Styles.ColumnHeader = cxStyle7
Styles.Footer = cxStyle10
Styles.Indicator = cxStyle11
Styles.Preview = cxStyle8
Align = alClient
Bands = <
item
Caption.AlignHorz = taCenter
MinWidth = 30
Width = 1000
end>
BufferedPaint = True
DataController.DataSource = ConvertTreeList3DemoDataDM.dsDepartments
DataController.ParentField = 'PARENTID'
DataController.KeyField = 'ID'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
LookAndFeel.Kind = lfUltraFlat
OptionsBehavior.GoToNextCellOnTab = True
OptionsBehavior.AutoDragCopy = True
OptionsBehavior.AutomateLeftMostIndent = False
OptionsBehavior.DragCollapse = False
OptionsBehavior.ExpandOnIncSearch = True
OptionsBehavior.ShowHourGlass = False
OptionsCustomizing.BandCustomizing = False
OptionsCustomizing.BandVertSizing = False
OptionsCustomizing.ColumnVertSizing = False
OptionsSelection.HideFocusRect = False
OptionsSelection.InvertSelect = False
OptionsView.CellTextMaxLineCount = -1
OptionsView.ShowEditButtons = ecsbFocused
OptionsView.Footer = True
OptionsView.GridLineColor = 15916479
OptionsView.GridLines = tlglBoth
OptionsView.Indicator = True
ParentColor = False
ParentFont = False
Preview.AutoHeight = False
Preview.MaxLineCount = 1
RootValue = 255
TabOrder = 0
object cxDBTreeListID: TcxDBTreeListColumn
PropertiesClassName = 'TcxMaskEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.MaxLength = 0
Properties.ReadOnly = True
Caption.Text = 'ID'
DataBinding.FieldName = 'ID'
Options.Sorting = False
Position.ColIndex = 7
Position.RowIndex = 0
Position.BandIndex = 0
Visible = False
Width = 45
end
object cxDBTreeListPARENTID: TcxDBTreeListColumn
PropertiesClassName = 'TcxMaskEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.MaxLength = 0
Properties.ReadOnly = False
Caption.Text = 'PARENTID'
DataBinding.FieldName = 'PARENTID'
Options.Sorting = False
Position.ColIndex = 6
Position.RowIndex = 0
Position.BandIndex = 0
Visible = False
Width = 162
end
object cxDBTreeListNAME: TcxDBTreeListColumn
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taLeftJustify
Properties.MaxLength = 50
Properties.ReadOnly = False
Caption.Text = 'NAME'
DataBinding.FieldName = 'NAME'
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
SortOrder = soDescending
Width = 290
end
object cxDBTreeListBUDGET: TcxDBTreeListColumn
PropertiesClassName = 'TcxCalcEditProperties'
Properties.Alignment.Horz = taRightJustify
Properties.ReadOnly = False
Caption.Text = 'BUDGET'
DataBinding.FieldName = 'BUDGET'
Options.Footer = True
Options.Sorting = False
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
SummaryFooter.Kind = skSum
Width = 132
end
object cxDBTreeListPHONE: TcxDBTreeListColumn
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taLeftJustify
Properties.MaxLength = 50
Properties.ReadOnly = False
Caption.Text = 'PHONE'
DataBinding.FieldName = 'PHONE'
Options.Sorting = False
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
Width = 161
end
object cxDBTreeListFAX: TcxDBTreeListColumn
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taLeftJustify
Properties.MaxLength = 50
Properties.ReadOnly = False
Caption.Text = 'FAX'
DataBinding.FieldName = 'FAX'
Options.Sorting = False
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 0
Width = 135
end
object cxDBTreeListEMAIL: TcxDBTreeListColumn
PropertiesClassName = 'TcxHyperLinkEditProperties'
Properties.Alignment.Horz = taLeftJustify
Properties.ReadOnly = False
Caption.Text = 'EMAIL'
DataBinding.FieldName = 'EMAIL'
Options.Sorting = False
Position.ColIndex = 4
Position.RowIndex = 0
Position.BandIndex = 0
Width = 200
end
object cxDBTreeListVACANCY: TcxDBTreeListColumn
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.Alignment = taLeftJustify
Properties.DisplayUnchecked = 'False'
Properties.NullStyle = nssUnchecked
Properties.ReadOnly = False
Properties.ValueChecked = 'True'
Properties.ValueGrayed = ''
Properties.ValueUnchecked = 'False'
Caption.Text = 'VACANCY'
DataBinding.FieldName = 'VACANCY'
MinWidth = 16
Options.Sorting = False
Position.ColIndex = 5
Position.RowIndex = 0
Position.BandIndex = 0
Width = 82
end
end
end
object cxStyleRepository1: TcxStyleRepository
Left = 24
Top = 8
object cxStyle6: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 16247513
TextColor = clWindowText
end
object cxStyle7: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15252642
Font.Charset = DEFAULT_CHARSET
Font.Color = 11032875
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = 11032875
end
object cxStyle8: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlue
end
object cxStyle9: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 15451300
TextColor = clBtnText
end
object cxStyle10: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 15252642
TextColor = clWindowText
end
object cxStyle11: TcxStyle
AssignedValues = [svColor]
Color = 15252642
end
object cxStyle12: TcxStyle
AssignedValues = [svColor]
Color = 16247513
end
end
end

View File

@ -0,0 +1,83 @@
//---------------------------------------------------------------------------
#ifndef ConvertTreeList3DemoMainH
#define ConvertTreeList3DemoMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxStyles.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include "cxLookAndFeels.hpp"
#include "DemoBasicMain.h"
#include "cxCalc.hpp"
#include "cxCheckBox.hpp"
#include "cxDBTL.hpp"
#include "cxHyperLinkEdit.hpp"
#include "cxInplaceContainer.hpp"
#include "cxMaskEdit.hpp"
#include "cxTextEdit.hpp"
#include "cxTL.hpp"
#include "cxTLData.hpp"
#include "dxCntner.hpp"
#include "dxDBCtrl.hpp"
#include "dxDBTL.hpp"
#include "dxDBTLCl.hpp"
#include "dxExEdtr.hpp"
#include "dxTL.hpp"
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TConvertTreeList3DemoMainForm : public TDemoBasicMainForm
{
__published: // IDE-managed Components
TPanel *pnlEQTL3Descrip;
TcxStyleRepository *cxStyleRepository1;
TcxStyle *cxStyle6;
TcxStyle *cxStyle7;
TcxStyle *cxStyle8;
TcxStyle *cxStyle9;
TcxStyle *cxStyle10;
TcxStyle *cxStyle11;
TcxStyle *cxStyle12;
TdxDBTreeList *dxDBTreeList;
TdxDBTreeListMaskColumn *dxDBTreeListID;
TdxDBTreeListMaskColumn *dxDBTreeListPARENTID;
TdxDBTreeListColumn *dxDBTreeListNAME;
TdxDBTreeListCalcColumn *dxDBTreeListBUDGET;
TdxDBTreeListColumn *dxDBTreeListPHONE;
TdxDBTreeListColumn *dxDBTreeListFAX;
TdxDBTreeListHyperLinkColumn *dxDBTreeListEMAIL;
TdxDBTreeListCheckColumn *dxDBTreeListVACANCY;
TPanel *pnlEQTL4Descrip;
TPanel *pnlTreeList4Container;
TcxDBTreeList *cxDBTreeList;
TcxDBTreeListColumn *cxDBTreeListID;
TcxDBTreeListColumn *cxDBTreeListPARENTID;
TcxDBTreeListColumn *cxDBTreeListNAME;
TcxDBTreeListColumn *cxDBTreeListBUDGET;
TcxDBTreeListColumn *cxDBTreeListPHONE;
TcxDBTreeListColumn *cxDBTreeListFAX;
TcxDBTreeListColumn *cxDBTreeListEMAIL;
TcxDBTreeListColumn *cxDBTreeListVACANCY;
void __fastcall FormShow(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TConvertTreeList3DemoMainForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TConvertTreeList3DemoMainForm *ConvertTreeList3DemoMainForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,45 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USERES("CustomDrawDemo.res");
USEFORM("CustomDrawDemoMain.cpp", CustomDrawDemoMainForm);
USEFORM("CustomDrawDemoData.cpp", CustomDrawDemoDataDM); /* TDataModule: File Type */
USEFORM("..\Common\DemoRating.cpp", DemoRatingForm);
USEFORM("..\Common\DemoBasicAbout.cpp", DemoBasicAboutForm);
USEFORM("..\Common\DemoBasicMain.cpp", DemoBasicMainForm);
USEFORM("CustomDrawDemoEditor.cpp", CustomDrawDemoEditorForm);
USEUNIT("CustomDrawDemoTypes.cpp");
USERC("CustomDrawDemoImages.rc");
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->HelpFile = "..\\..\\Help\\EQTreeList4.hlp";
Application->Title = "ExpressQuantumTreeList4 CustomDrawDemo";
Application->CreateForm(__classid(TCustomDrawDemoDataDM), &CustomDrawDemoDataDM);
Application->CreateForm(__classid(TCustomDrawDemoMainForm), &CustomDrawDemoMainForm);
Application->CreateForm(__classid(TCustomDrawDemoEditorForm), &CustomDrawDemoEditorForm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppVCLApplication</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.node" name="name" value="CustomDrawDemo.exe"/>
<property category="build.node" name="sparelibs" value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.1" value="$(SYSDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.2" value="$(USERDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.3" value="NO_WIN32_LEAN_AND_MEAN"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BCB)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.5" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.6" value="..\Common"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BCB)\lib\release"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BCB)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.4" value="$(BCB)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.5" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="."/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="$(LIBRARIES)"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="import32.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="cp32mt.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0w32.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="Memmgr.Lib"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.3" value="$(PACKAGES)"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.4" value="sysinit.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
</optionset>
</project>
</BCBPROJECT>
<Source>
<Source Name="MainSource">CustomDrawDemo.cpp</Source>
</Source>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.10.00"/>
<PROJECT value="CustomDrawDemo.exe"/>
<OBJFILES value="CustomDrawDemo.obj CustomDrawDemoMain.obj CustomDrawDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj CustomDrawDemoTypes.obj CustomDrawDemoEditor.obj"/>
<RESFILES value="CustomDrawDemo.res CustomDrawDemoImages.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) CustomDrawDemoMain.dfm CustomDrawDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm CustomDrawDemoEditor.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="CustomDrawDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder10"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder10"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="CustomDrawDemo.exe"/>
<OBJFILES value="CustomDrawDemo.obj CustomDrawDemoMain.obj CustomDrawDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj CustomDrawDemoTypes.obj CustomDrawDemoEditor.obj"/>
<RESFILES value="CustomDrawDemo.res CustomDrawDemoImages.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) CustomDrawDemoMain.dfm CustomDrawDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm CustomDrawDemoEditor.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<SPARELIBS value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="CustomDrawDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder5"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder5"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="CustomDrawDemo.exe"/>
<OBJFILES value="CustomDrawDemo.obj CustomDrawDemoMain.obj CustomDrawDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj CustomDrawDemoTypes.obj CustomDrawDemoEditor.obj"/>
<RESFILES value="CustomDrawDemo.res CustomDrawDemoImages.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) CustomDrawDemoMain.dfm CustomDrawDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm CustomDrawDemoEditor.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="CustomDrawDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder6"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder6"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,28 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "CustomDrawDemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxStyles"
#pragma link "cxTL"
#pragma resource "*.dfm"
TCustomDrawDemoDataDM *CustomDrawDemoDataDM;
//---------------------------------------------------------------------------
__fastcall TCustomDrawDemoDataDM::TCustomDrawDemoDataDM(TComponent* Owner)
: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------
void TCustomDrawDemoDataDM::SetParentValue(Variant AValue)
{
if ((tblDepartments->State == dsEdit) || (tblDepartments->State == dsInsert))
tblDepartments->FindField("ParentID")->Value = AValue;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,236 @@
object CustomDrawDemoDataDM: TCustomDrawDemoDataDM
Left = 310
Top = 163
Height = 229
Width = 325
object Database: TDatabase
Connected = True
DatabaseName = 'DemosDB'
DriverName = 'STANDARD'
Params.Strings = (
'PATH=..\..\Data'
'DEFAULT DRIVER=PARADOX'
'ENABLE BCD=FALSE')
SessionName = 'Default'
Left = 40
Top = 8
end
object tblDepartments: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'DEPARTMENTS.DB'
Left = 40
Top = 64
object tblDepartmentsID: TAutoIncField
FieldName = 'ID'
Visible = False
end
object tblDepartmentsPARENTID: TIntegerField
FieldName = 'PARENTID'
Visible = False
end
object tblDepartmentsNAME: TStringField
FieldName = 'NAME'
Size = 50
end
object tblDepartmentsBUDGET: TFloatField
FieldName = 'BUDGET'
end
object tblDepartmentsPHONE: TStringField
FieldName = 'PHONE'
Size = 50
end
object tblDepartmentsFAX: TStringField
FieldName = 'FAX'
Size = 50
end
object tblDepartmentsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 255
end
object tblDepartmentsVACANCY: TBooleanField
FieldName = 'VACANCY'
end
object tblDepartmentsMANAGERID: TIntegerField
FieldName = 'MANAGERID'
Visible = False
end
end
object dsDepartments: TDataSource
DataSet = tblDepartments
Left = 40
Top = 112
end
object dsPersons: TDataSource
DataSet = tblPersons
Left = 160
Top = 120
end
object tblPersons: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'PERSONS.DB'
Left = 160
Top = 72
object tblPersonsID: TIntegerField
FieldName = 'ID'
end
object tblPersonsName: TStringField
FieldName = 'Name'
Size = 50
end
object tblPersonsAddress: TStringField
FieldName = 'Address'
Size = 100
end
object tblPersonsPhone: TStringField
FieldName = 'Phone'
Size = 24
end
object tblPersonsFax: TStringField
FieldName = 'Fax'
Size = 24
end
object tblPersonsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 100
end
end
object StyleRepository: TcxStyleRepository
Left = 160
Top = 8
object cxStyle1: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle2: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle3: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14652517
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = 8200196
end
object cxStyle4: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15252642
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = 11032875
end
object cxStyle5: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle6: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15253902
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle7: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle8: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16776183
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle9: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle10: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 4707838
TextColor = clBlack
end
object cxStyle11: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle12: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16776183
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clNavy
end
object cxStyle13: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 16048336
TextColor = clBlack
end
object styNoVacancy: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14671839
Font.Charset = DEFAULT_CHARSET
Font.Color = 10658466
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = 10658466
end
object styVacancy: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15253902
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = 14916958
end
object TreeListStyleSheetDevExpress: TcxTreeListStyleSheet
Caption = 'DevExpress'
Styles.Background = cxStyle1
Styles.Content = cxStyle5
Styles.Inactive = cxStyle9
Styles.Selection = cxStyle13
Styles.BandBackground = cxStyle2
Styles.BandHeader = cxStyle3
Styles.ColumnHeader = cxStyle4
Styles.ContentEven = cxStyle7
Styles.ContentOdd = cxStyle6
Styles.Footer = cxStyle8
Styles.IncSearch = cxStyle10
Styles.Indicator = cxStyle11
Styles.Preview = cxStyle12
BuiltIn = True
end
end
end

View File

@ -0,0 +1,64 @@
//---------------------------------------------------------------------------
#ifndef CustomDrawDemoDataH
#define CustomDrawDemoDataH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include "cxTL.hpp"
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TCustomDrawDemoDataDM : public TDataModule
{
__published: // IDE-managed Components
TDatabase *DataBase;
TTable *tblDepartments;
TAutoIncField *tblDepartmentsID;
TIntegerField *tblDepartmentsPARENTID;
TStringField *tblDepartmentsNAME;
TFloatField *tblDepartmentsBUDGET;
TStringField *tblDepartmentsPHONE;
TStringField *tblDepartmentsFAX;
TStringField *tblDepartmentsEMAIL;
TBooleanField *tblDepartmentsVACANCY;
TIntegerField *tblDepartmentsMANAGERID;
TDataSource *dsDepartments;
TDataSource *dsPersons;
TTable *tblPersons;
TIntegerField *tblPersonsID;
TStringField *tblPersonsName;
TStringField *tblPersonsAddress;
TStringField *tblPersonsPhone;
TStringField *tblPersonsFax;
TStringField *tblPersonsEMAIL;
TcxStyleRepository *StyleRepository;
TcxStyle *cxStyle1;
TcxStyle *cxStyle2;
TcxStyle *cxStyle3;
TcxStyle *cxStyle4;
TcxStyle *cxStyle5;
TcxStyle *cxStyle6;
TcxStyle *cxStyle7;
TcxStyle *cxStyle8;
TcxStyle *cxStyle9;
TcxStyle *cxStyle10;
TcxStyle *cxStyle11;
TcxStyle *cxStyle12;
TcxStyle *cxStyle13;
TcxStyle *styNoVacancy;
TcxStyle *styVacancy;
TcxTreeListStyleSheet *TreeListStyleSheetDevExpress;
private: // User declarations
public: // User declarations
__fastcall TCustomDrawDemoDataDM(TComponent* Owner);
void SetParentValue(Variant AValue);
};
//---------------------------------------------------------------------------
extern PACKAGE TCustomDrawDemoDataDM *CustomDrawDemoDataDM;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,197 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "CustomDrawDemoEditor.h"
#include "CustomDrawDemoMain.h"
#include "CustomDrawDemoTypes.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxButtons"
#pragma link "cxCheckBox"
#pragma link "cxContainer"
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxDropDownEdit"
#pragma link "cxEdit"
#pragma link "cxGraphics"
#pragma link "cxInplaceContainer"
#pragma link "cxLookAndFeelPainters"
#pragma link "cxMaskEdit"
#pragma link "cxMRUEdit"
#pragma link "cxRadioGroup"
#pragma link "cxStyles"
#pragma link "cxTextEdit"
#pragma link "cxTL"
#pragma link "cxCurrencyEdit"
#pragma link "cxDBLookupComboBox"
#pragma link "cxMemo"
#pragma resource "*.dfm"
TCustomDrawDemoEditorForm *CustomDrawDemoEditorForm;
//---------------------------------------------------------------------------
__fastcall TCustomDrawDemoEditorForm::TCustomDrawDemoEditorForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::FormCreate(TObject *Sender)
{
FillCustomDrawItemList();
FillBkImageTypeList();
FillColorSchemeList();
OpenDialog->InitialDir = ExtractFilePath(Application->ExeName);
}
void TCustomDrawDemoEditorForm::FillCustomDrawItemList()
{
TcxItemCustomDrawInfo *AItem;
TcxCustomDrawInfo *AInfo = CustomDrawDemoMainForm->CustomDrawInfo;
for (int I = 0; I < AInfo->Count; I++){
TcxTreeListNode *ANode = tlCustomDrawItems->Nodes->Root->AddChild();
AItem = AInfo->GetItemByIndex(I);
ANode->Data = AItem;
ANode->Values[0] = CustomDrawAreaNames[AItem->DrawArea];
}
}
void TCustomDrawDemoEditorForm::FillBkImageTypeList()
{
for (int I = 0; I < BkImageCount; I++)
if ((TBkImage)I == bkiUserDefined)
mruBkImage->Properties->LookupItems->Add("User Defined");
else
mruBkImage->Properties->LookupItems->Add(BkImageResNames[I]);
}
void TCustomDrawDemoEditorForm::FillColorSchemeList()
{
for (int I = 0; I < ColorSchemeCount; I++)
cbGradient->Properties->Items->Add(ColorSchemeNames[I]);
}
//---------------------------------------------------------------------------
void TCustomDrawDemoEditorForm::AdjustSettings(TcxTreeListNode *ASelectedNode)
{
TcxItemCustomDrawInfo *AItem = ((TcxItemCustomDrawInfo*)ASelectedNode->Data);
rbBackGroundImage->Checked = AItem->DrawingStyle == cdsBkImage;
rbGradient->Checked = AItem->DrawingStyle == cdsGradient;
rpendsOnTheData->Checked = AItem->DrawingStyle == cdsDependsOnData;
rfaultDrawing->Checked = AItem->DrawingStyle == cdsDefaultDrawing;
chbOwnerDrawText->Checked = AItem->OwnerTextDraw;
rpendsOnTheData->Visible = AItem->ItemType == itCell;
mruBkImage->Text = BkImageResNames[(int)AItem->BkImageType];
cbGradient->ItemIndex = (int)AItem->ColorScheme;
AdjustControlsEnable();
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::tlCustomDrawItemsSelectionChanged(TObject *Sender)
{
if (tlCustomDrawItems->SelectionCount > 0)
AdjustSettings(tlCustomDrawItems->Selections[0]);
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::rbRadioButtonClick(TObject *Sender)
{
((TcxRadioButton*)Sender)->Checked = true;
TcxItemCustomDrawInfo *AItem = GetSelectedDrawItem();
if (AItem != NULL){
AItem->DrawingStyle = (TCustomDrawingStyle)((TcxRadioButton*)Sender)->Tag;
AdjustControlsEnable();
CustomDrawDemoMainForm->cxDBTreeList->Invalidate();
}
}
//---------------------------------------------------------------------------
TBkImage TCustomDrawDemoEditorForm::GetBkImageTypeByName(String AName)
{
TBkImage Result = bkiUserDefined;
for (int I = 0; I < BkImageCount; I++)
if (BkImageResNames[I] == AName){
Result = (TBkImage)I;
break;
}
return Result;
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::mruBkImagePropertiesEditValueChanged(TObject *Sender)
{
GetSelectedDrawItem()->BkImageType =
GetBkImageTypeByName(((TcxMRUEdit*)Sender)->EditValue);
CustomDrawDemoMainForm->cxDBTreeList->Invalidate();
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::mruBkImagePropertiesButtonClick(TObject *Sender)
{
if (OpenDialog->Execute()){
Graphics::TBitmap *ABitmap = new Graphics::TBitmap();
ABitmap->LoadFromFile(OpenDialog->FileName);
GetSelectedDrawItem()->Bitmap = ABitmap;
((TcxCustomEdit*)Sender)->EditValue = "User Defined";
CustomDrawDemoMainForm->cxDBTreeList->Invalidate();
}
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::cbGradientPropertiesChange(TObject *Sender)
{
GetSelectedDrawItem()->ColorScheme = (TcxColorScheme)((TcxComboBox*)Sender)->ItemIndex;
CustomDrawDemoMainForm->cxDBTreeList->Invalidate();
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::chbOwnerDrawTextPropertiesChange(TObject *Sender)
{
AdjustControlsEnable();
GetSelectedDrawItem()->OwnerTextDraw = chbOwnerDrawText->Checked;
CustomDrawDemoMainForm->cxDBTreeList->Invalidate();
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::sbFontClick(TObject *Sender)
{
if (FontDialog->Execute()){
TFont *AFont = new TFont();
AFont->Assign(FontDialog->Font);
GetSelectedDrawItem()->Font = AFont;
CustomDrawDemoMainForm->cxDBTreeList->Invalidate();
}
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoEditorForm::btnCloseClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void TCustomDrawDemoEditorForm::AdjustControlsEnable()
{
mruBkImage->Enabled = rbBackGroundImage->Checked;
cbGradient->Enabled = rbGradient->Checked;
chbOwnerDrawText->Visible = GetSelectedDrawItem()->ItemType == itCell &&
!(rfaultDrawing->Checked || rpendsOnTheData->Checked);
TcxItemCustomDrawType AItemType = GetSelectedDrawItem()->ItemType;
lbFont->Enabled =
AItemType == itText || AItemType == itCell && chbOwnerDrawText->Checked;
sbFont->Enabled = lbFont->Enabled;
}
//---------------------------------------------------------------------------
TcxItemCustomDrawInfo* TCustomDrawDemoEditorForm::GetSelectedDrawItem()
{
TcxItemCustomDrawInfo *Result = NULL;
if (tlCustomDrawItems->SelectionCount > 0)
Result = ((TcxItemCustomDrawInfo*)tlCustomDrawItems->Selections[0]->Data);
return Result;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,213 @@
object CustomDrawDemoEditorForm: TCustomDrawDemoEditorForm
Left = 344
Top = 235
ActiveControl = tlCustomDrawItems
BorderStyle = bsDialog
Caption = 'Custom Draw Settings'
ClientHeight = 227
ClientWidth = 425
Color = 15451300
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsStayOnTop
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object btnClose: TcxButton
Left = 342
Top = 192
Width = 75
Height = 25
Cancel = True
Caption = 'Close'
Default = True
ModalResult = 2
TabOrder = 2
OnClick = btnCloseClick
LookAndFeel.NativeStyle = True
end
object tlCustomDrawItems: TcxTreeList
Left = 8
Top = 8
Width = 129
Height = 209
Styles.Background = CustomDrawDemoDataDM.cxStyle7
Styles.Content = CustomDrawDemoDataDM.cxStyle7
Styles.Inactive = CustomDrawDemoDataDM.cxStyle6
Styles.Selection = CustomDrawDemoDataDM.cxStyle6
Styles.ColumnHeader = CustomDrawDemoDataDM.cxStyle4
Bands = <
item
Caption.Text = 'Band + 1'
end>
BufferedPaint = False
OptionsBehavior.ImmediateEditor = False
OptionsBehavior.AutomateLeftMostIndent = False
OptionsBehavior.DragExpand = False
OptionsBehavior.Sorting = False
OptionsBehavior.MultiSort = False
OptionsBehavior.ShowHourGlass = False
OptionsCustomizing.BandCustomizing = False
OptionsCustomizing.BandHorzSizing = False
OptionsCustomizing.BandMoving = False
OptionsCustomizing.BandVertSizing = False
OptionsCustomizing.ColumnCustomizing = False
OptionsCustomizing.ColumnHorzSizing = False
OptionsCustomizing.ColumnMoving = False
OptionsCustomizing.ColumnVertSizing = False
OptionsData.Editing = False
OptionsData.Deleting = False
OptionsSelection.InvertSelect = False
OptionsView.CellAutoHeight = True
OptionsView.Buttons = False
OptionsView.ColumnAutoWidth = True
OptionsView.ShowRoot = False
TabOrder = 0
OnSelectionChanged = tlCustomDrawItemsSelectionChanged
object tlCustomDrawItemscxTreeListColumn1: TcxTreeListColumn
Caption.Text = 'Draw Item'
DataBinding.ValueType = 'String'
Options.Sorting = False
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
Width = 127
end
end
object gbEventHandlerSettings: TGroupBox
Left = 144
Top = 8
Width = 273
Height = 177
Caption = 'Event Handler Settings'
TabOrder = 1
object lbFont: TLabel
Left = 142
Top = 145
Width = 60
Height = 13
Caption = 'Choose Font'
end
object sbFont: TSpeedButton
Left = 216
Top = 140
Width = 23
Height = 22
Glyph.Data = {
66010000424D6601000000000000760000002800000016000000140000000100
040000000000F000000000000000000000001000000010000000000000000000
8000008000000080800080000000800080008080000080808000C0C0C0000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00800000000000
0000000000008FFFFFFFFFFFFFFFFFFFF0008FF44FFFFFFFFFFFFFFFF0008FF4
4FFFFFFFFFFFFFFFF0008FF44FFFFFFFFF818FFFF0008FF444FFFFFFFFF1FFFF
F0008FF44FFFFFFFFFF1F8FFF0008FF44FFFFFFFFFF111FFF0008FF4444FF55F
FFF1F8FFF0008FFFFFFFFF85FFF1FF8FF0008FFFFFFFFFF5FF81111FF0008FFF
FFFFFFF5FFFFFFFFF0008FFFFFFFFF555FFFFFFFF0008FFFFFFFFFF5FFFFFFFF
F0008FFFFFFFFFF58FFFFFFFF0008FFFFFFFFFFF55FFFFFFF0008FFFFFFFFFFF
FFFFFFFFF0008000000000000000000000008F0CCCCCCCCCCCCCC0F0F0008888
88888888888888888800}
OnClick = sbFontClick
end
object bvSeparator: TBevel
Left = 16
Top = 129
Width = 249
Height = 4
Shape = bsBottomLine
end
object cbGradient: TcxComboBox
Left = 138
Top = 48
Width = 120
Height = 21
Properties.DropDownListStyle = lsFixedList
Properties.OnChange = cbGradientPropertiesChange
Style.Color = 16247513
TabOrder = 3
end
object mruBkImage: TcxMRUEdit
Left = 138
Top = 24
Width = 120
Height = 21
Properties.DropDownListStyle = lsFixedList
Properties.ReadOnly = False
Properties.OnButtonClick = mruBkImagePropertiesButtonClick
Properties.OnEditValueChanged = mruBkImagePropertiesEditValueChanged
Style.BorderStyle = ebsUltraFlat
Style.Color = 16247513
TabOrder = 1
end
object rbBackGroundImage: TcxRadioButton
Left = 8
Top = 24
Width = 130
Height = 17
Caption = '&Background Image'
Checked = True
Color = 15451300
ParentColor = False
TabOrder = 0
TabStop = True
OnClick = rbRadioButtonClick
end
object rbGradient: TcxRadioButton
Tag = 1
Left = 8
Top = 48
Width = 130
Height = 17
Caption = '&Gradient'
TabOrder = 2
OnClick = rbRadioButtonClick
end
object rpendsOnTheData: TcxRadioButton
Tag = 3
Left = 8
Top = 96
Width = 130
Height = 17
Caption = 'D&epends On the Data'
TabOrder = 4
OnClick = rbRadioButtonClick
end
object rfaultDrawing: TcxRadioButton
Tag = 2
Left = 8
Top = 72
Width = 130
Height = 17
Caption = '&Default Drawing'
TabOrder = 5
OnClick = rbRadioButtonClick
end
object chbOwnerDrawText: TcxCheckBox
Left = 11
Top = 141
Width = 121
Height = 21
Properties.DisplayUnchecked = 'False'
Properties.OnChange = chbOwnerDrawTextPropertiesChange
Properties.Caption = 'Owner &draw text'
TabOrder = 6
end
end
object FontDialog: TFontDialog
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
MinFontSize = 0
MaxFontSize = 0
Left = 352
end
object OpenDialog: TOpenDialog
Filter = 'BMP Windows Bitmap|*.bmp'
Left = 384
end
end

View File

@ -0,0 +1,77 @@
//---------------------------------------------------------------------------
#ifndef CustomDrawDemoEditorH
#define CustomDrawDemoEditorH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxButtons.hpp"
#include "cxCheckBox.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxInplaceContainer.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxMaskEdit.hpp"
#include "cxMRUEdit.hpp"
#include "cxRadioGroup.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "cxTL.hpp"
#include <Buttons.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include "CustomDrawDemoTypes.h"
#include "cxCurrencyEdit.hpp"
#include "cxDBLookupComboBox.hpp"
#include "cxMemo.hpp"
#include "CustomDrawDemoMain.h"
//---------------------------------------------------------------------------
class TCustomDrawDemoEditorForm : public TForm
{
__published: // IDE-managed Components
TcxButton *btnClose;
TcxTreeList *tlCustomDrawItems;
TcxTreeListColumn *tlCustomDrawItemscxTreeListColumn1;
TGroupBox *gbEventHandlerSettings;
TLabel *lbFont;
TSpeedButton *sbFont;
TBevel *bvSeparator;
TcxComboBox *cbGradient;
TcxMRUEdit *mruBkImage;
TcxRadioButton *rbBackGroundImage;
TcxRadioButton *rbGradient;
TcxRadioButton *rpendsOnTheData;
TcxRadioButton *rfaultDrawing;
TcxCheckBox *chbOwnerDrawText;
TFontDialog *FontDialog;
TOpenDialog *OpenDialog;
void __fastcall FormCreate(TObject *Sender);
void __fastcall tlCustomDrawItemsSelectionChanged(TObject *Sender);
void __fastcall rbRadioButtonClick(TObject *Sender);
void __fastcall mruBkImagePropertiesEditValueChanged(TObject *Sender);
void __fastcall mruBkImagePropertiesButtonClick(TObject *Sender);
void __fastcall cbGradientPropertiesChange(TObject *Sender);
void __fastcall chbOwnerDrawTextPropertiesChange(TObject *Sender);
void __fastcall sbFontClick(TObject *Sender);
void __fastcall btnCloseClick(TObject *Sender);
private:
void AdjustControlsEnable();
void AdjustSettings(TcxTreeListNode *ASelectedNode);
TBkImage GetBkImageTypeByName(String AName);
void FillCustomDrawItemList();
void FillBkImageTypeList();
void FillColorSchemeList();
TcxItemCustomDrawInfo* GetSelectedDrawItem();
public: // User declarations
__fastcall TCustomDrawDemoEditorForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TCustomDrawDemoEditorForm *CustomDrawDemoEditorForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,5 @@
CAR RCDATA "..\..\Data\Car.bmp"
SKY RCDATA "..\..\Data\SKY.bmp"
EGYPT RCDATA "..\..\Data\EGYPT.bmp"
MYFACE RCDATA "..\..\Data\MYFACE.bmp"
TILE RCDATA "..\..\Data\TILE.bmp"

View File

@ -0,0 +1,606 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "CustomDrawDemoMain.h"
#include "CustomDrawDemoData.h"
#include "CustomDrawDemoTypes.h"
#include "CustomDrawDemoEditor.h"
#include "cxLookAndFeelPainters.hpp"
#include "cxCustomData.hpp"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxData"
#pragma link "cxDBData"
#pragma link "cxEdit"
#pragma link "cxFilter"
#pragma link "cxGraphics"
#pragma link "cxStyles"
#pragma link "cxLookAndFeels"
#pragma link "DemoBasicMain"
#pragma link "cxCheckBox"
#pragma link "cxCurrencyEdit"
#pragma link "cxDBLookupComboBox"
#pragma link "cxDBTL"
#pragma link "cxEditRepositoryItems"
#pragma link "cxInplaceContainer"
#pragma link "cxMaskEdit"
#pragma link "cxMemo"
#pragma link "cxTL"
#pragma link "cxTLData"
#pragma link "cxTextEdit"
#pragma resource "*.dfm"
TCustomDrawDemoMainForm *CustomDrawDemoMainForm;
/* TcxCustomDrawInfo implementation*/
__fastcall TcxCustomDrawInfo::TcxCustomDrawInfo(void)
{
FBitmaps = new TList();
LoadResourceBitmaps();
FDefaultFont = new TFont();
FCustomDrawData = new TList();
}
void TcxCustomDrawInfo::LoadResourceBitmaps()
{
Graphics::TBitmap *ABitmap;
for (int I = 0; I < BkImageCount; I++){
ABitmap = new Graphics::TBitmap();
LoadImageFromRes(ABitmap, BkImageResNames[I]);
FBitmaps->Add(ABitmap);
}
}
//---------------------------------------------------------------------------
__fastcall TcxCustomDrawInfo::~TcxCustomDrawInfo(void)
{
for (int I = 0; I < FCustomDrawData->Count; I++)
delete (TcxItemCustomDrawInfo*)FCustomDrawData->Items[I];
for (int I = 0; I < FBitmaps->Count; I++)
delete (Graphics::TBitmap*)FBitmaps->Items[I];
delete FCustomDrawData;
delete FBitmaps;
delete FDefaultFont;
}
//---------------------------------------------------------------------------
void TcxCustomDrawInfo::AddNewItem(TCustomDrawArea ADrawArea,
TcxItemCustomDrawType AItemType)
{
FCustomDrawData->Add(new TcxItemCustomDrawInfo(this, ADrawArea, AItemType));
}
//---------------------------------------------------------------------------
TcxItemCustomDrawInfo* TcxCustomDrawInfo::GetItemByIndex(int AIndex)
{
return ((TcxItemCustomDrawInfo*)FCustomDrawData->Items[AIndex]);
}
//---------------------------------------------------------------------------
Graphics::TBitmap* TcxCustomDrawInfo::GetBkBitmap(TBkImage ABkImage)
{
return (Graphics::TBitmap*)FBitmaps->Items[int(ABkImage)];
}
//---------------------------------------------------------------------------
int TcxCustomDrawInfo::GetCount(void)
{
return FCustomDrawData->Count;
}
//---------------------------------------------------------------------------
TcxItemCustomDrawInfo* TcxCustomDrawInfo::GetItem(TCustomDrawArea ADrawArea)
{
TcxItemCustomDrawInfo *Result = NULL;
for (int I = 0; I < FCustomDrawData->Count; I++)
if (((TcxItemCustomDrawInfo*)FCustomDrawData->Items[I])->DrawArea == ADrawArea){
Result = ((TcxItemCustomDrawInfo*)FCustomDrawData->Items[I]);
break;
}
return Result;
}
//---------------------------------------------------------------------------
/*TcxItemCustomDrawInfo implementation*/
__fastcall TcxItemCustomDrawInfo::TcxItemCustomDrawInfo(TcxCustomDrawInfo *AOwner,
TCustomDrawArea ADrawArea, TcxItemCustomDrawType AItemType)
{
FOwner = AOwner;
FDrawArea = ADrawArea;
FItemType = AItemType;
if (FOwner != NULL)
FBitmap = AOwner->Bitmaps[TBkImage(0)];
else
FBitmap = NULL;
if (FOwner != NULL)
FFont = AOwner->DefaultFont;
else
FBitmap = NULL;
FBkImageType = (TBkImage)0;
FDrawingStyle = (TCustomDrawingStyle)0;
FColorScheme = (TcxColorScheme)0;
FIsBitmapAssigned = false;
FIsFontAssigned = false;
}
//---------------------------------------------------------------------------
__fastcall TcxItemCustomDrawInfo::~TcxItemCustomDrawInfo()
{
if (FIsBitmapAssigned)
delete FBitmap;
if (FIsFontAssigned)
delete FFont;
}
//---------------------------------------------------------------------------
Graphics::TBitmap* TcxItemCustomDrawInfo::GetBitmap()
{
if ((FBkImageType != bkiUserDefined || !FIsBitmapAssigned) &&
(FOwner != NULL))
return FOwner->Bitmaps[FBkImageType];
else
return FBitmap;
}
//---------------------------------------------------------------------------
TFont* TcxItemCustomDrawInfo::GetFont()
{
return FFont;
}
//---------------------------------------------------------------------------
void TcxItemCustomDrawInfo::SetBitmap(Graphics::TBitmap *Value)
{
if (FIsBitmapAssigned)
delete FBitmap;
FBitmap = Value;
FIsBitmapAssigned = true;
FBkImageType = bkiUserDefined;
}
//---------------------------------------------------------------------------
void TcxItemCustomDrawInfo::SetFont(TFont *Value)
{
if (FIsFontAssigned)
delete FFont;
FFont = Value;
FIsFontAssigned = true;
}
//---------------------------------------------------------------------------
/*TCustomDrawDemoMainForm implementation*/
__fastcall TCustomDrawDemoMainForm::TCustomDrawDemoMainForm(TComponent* Owner)
: TDemoBasicMainForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::FormShow(TObject *Sender)
{
cxDBTreeList->FullExpand();
CustomDrawDemoEditorForm->Show();
/* remove/add the closing slash on this line to disable/enable the following code *
ShowMessage("WARNING: tutorial not completed. First, please apply the steps "
"shown in the doc file");
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::FormCreate(TObject *Sender)
{
FCustomDrawInfo = new TcxCustomDrawInfo;
AddCustomDrawInfos();
AdjustCustomDrawItems();
miGridLookFeel->Visible = false;
miSeparator2->Visible = false;
}
void TCustomDrawDemoMainForm::AddCustomDrawInfos()
{
FCustomDrawInfo->AddNewItem(cdaBackground, itNormal);
FCustomDrawInfo->AddNewItem(cdaBandHeader, itText);
FCustomDrawInfo->AddNewItem(cdaCell, itCell);
FCustomDrawInfo->AddNewItem(cdaCellsGroup, itNormal);
FCustomDrawInfo->AddNewItem(cdaFooter, itNormal);
FCustomDrawInfo->AddNewItem(cdaFooterCell, itText);
FCustomDrawInfo->AddNewItem(cdaHeader, itNormal);
FCustomDrawInfo->AddNewItem(cdaHeaderCell, itText);
FCustomDrawInfo->AddNewItem(cdaIndentCell, itNormal);
FCustomDrawInfo->AddNewItem(cdaIndicatorCell, itNormal);
FCustomDrawInfo->AddNewItem(cdaPreview, itCell);
}
void TCustomDrawDemoMainForm::AdjustCustomDrawItems()
{
FCustomDrawInfo->Items[cdaHeaderCell]->DrawingStyle = cdsBkImage;
FCustomDrawInfo->Items[cdaBackground]->BkImageType = bkiEgypt;
FCustomDrawInfo->Items[cdaIndentCell]->BkImageType = bkiEgypt;
FCustomDrawInfo->Items[cdaFooter]->BkImageType = bkiMyFace;
FCustomDrawInfo->Items[cdaFooterCell]->BkImageType = bkiMyFace;
FCustomDrawInfo->Items[cdaPreview]->BkImageType = bkiMyFace;
FCustomDrawInfo->Items[cdaHeaderCell]->DrawingStyle = cdsGradient;
FCustomDrawInfo->Items[cdaBandHeader]->DrawingStyle = cdsGradient;
FCustomDrawInfo->Items[cdaBandHeader]->ColorScheme = csBlue;
FCustomDrawInfo->Items[cdaIndicatorCell]->DrawingStyle = cdsGradient;
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::FormDestroy(TObject *Sender)
{
delete FCustomDrawInfo;
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::actCustomizationFormExecute(
TObject *Sender)
{
CustomDrawDemoEditorForm->Show();
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::LookAndFeelChange(TObject *Sender)
{
//
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListInitInsertingRecord(
TObject *Sender, TcxTreeListDataNode *AFocusedNode, bool &AHandled)
{
if (AFocusedNode != NULL)
{
CustomDrawDemoDataDM->SetParentValue(AFocusedNode->ParentValue);
}
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawBackground(
TObject *Sender, TcxCanvas *ACanvas, const TRect &R, bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawItem(FCustomDrawInfo->Items[cdaBackground], ACanvas, R);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawBandHeader(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListHeaderViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawHeaderItem(FCustomDrawInfo->Items[cdaBandHeader], ACanvas, AViewInfo, Sender);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawCellsGroup(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListCellsGroupViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
if (AViewInfo->Selected) return;
ADone = DrawItem(FCustomDrawInfo->Items[cdaCellsGroup], ACanvas, AViewInfo->VisibleRect);
if (!ADone) return;
ACanvas->Pen->Color = ((TcxDBTreeList*)Sender)->OptionsView->GridLineColor;
ACanvas->Brush->Style = bsClear;
TRect ARect = AViewInfo->BoundsRect;
ACanvas->Canvas->Rectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawFooter(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListBandViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawItem(FCustomDrawInfo->Items[cdaFooter], ACanvas, AViewInfo->VisibleRect);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawFooterCell(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListFooterItemViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
TcxItemCustomDrawInfo *AItem = FCustomDrawInfo->Items[cdaFooterCell];
if (AItem->DrawingStyle == cdsDefaultDrawing) return;
ADone = DrawItem(AItem, ACanvas, AViewInfo->VisibleRect);
ACanvas->Font = AItem->Font;
ACanvas->Brush->Style = bsClear;
ACanvas->DrawTexT(AViewInfo->Text, cxRectInflate(AViewInfo->BoundsRect, -2, -2), 0, true);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawHeaderCell(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListHeaderViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawHeaderItem(FCustomDrawInfo->Items[cdaHeaderCell], ACanvas, AViewInfo, Sender);
//*/
}
//---------------------------------------------------------------------------
void TCustomDrawDemoMainForm::DrawTreeLines(TcxTreeListIndentViewInfo *AViewInfo,
TcxCanvas *ACanvas)
{
if (AViewInfo->TreeLines.Contains(tltVertUp) ||
AViewInfo->TreeLines.Contains(tltVertDown))
cxFillHalfToneRect(ACanvas->Canvas, AViewInfo->VertTreeLine,
AViewInfo->ViewParams.Color, cxDBTreeList->OptionsView->TreeLineColor);
if (AViewInfo->TreeLines.Contains(tltHorz))
cxFillHalfToneRect(ACanvas->Canvas, AViewInfo->HorzTreeLine,
AViewInfo->ViewParams.Color, cxDBTreeList->OptionsView->TreeLineColor);
}
void TCustomDrawDemoMainForm::DrawRectWithBorders(TcxCanvas *ACanvas,
TcxBorders ABorders, TColor AColor, const TRect &ARect)
{
ACanvas->Brush->Color = AColor;
if (ABorders.Contains(bLeft))
ACanvas->FillRect(cxRect(ARect.Left, ARect.Top, ARect.Left + 1, ARect.Bottom), NULL, False);
if (ABorders.Contains(bRight))
ACanvas->FillRect(cxRect(ARect.Right - 1, ARect.Top, ARect.Right, ARect.Bottom), NULL, False);
if (ABorders.Contains(bTop))
ACanvas->FillRect(cxRect(ARect.Left, ARect.Top, ARect.Right, ARect.Top + 1), NULL, False);
if (ABorders.Contains(bBottom))
ACanvas->FillRect(cxRect(ARect.Left, ARect.Bottom - 1, ARect.Right, ARect.Bottom), NULL, False);
}
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawIndentCell(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListIndentViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawItem(FCustomDrawInfo->Items[cdaIndentCell], ACanvas, AViewInfo->VisibleRect);
if (!ADone) return;
DrawRectWithBorders(ACanvas, AViewInfo->Borders,
((TcxDBTreeList*)Sender)->OptionsView->GridLineColor, AViewInfo->BoundsRect);
DrawTreeLines(AViewInfo, ACanvas);
if (AViewInfo->HasButton){
TRect ARect = AViewInfo->ButtonRect;
DrawItem(FCustomDrawInfo->Items[cdaIndentCell], ACanvas, ARect);
ACanvas->FrameRect(ARect, clBtnText, 1, TcxBorders()<<bLeft<<bTop<<bRight<<bBottom, False);
int ASize = ARect.Right - ARect.Left - 2 * 2;
int X = (ARect.Left + ARect.Right) >> 1;
int Y = (ARect.Top + ARect.Bottom) >> 1;
ACanvas->Brush->Color = clBtnText;
ACanvas->FillRect(Rect(X - (ASize >> 1), Y, X + (ASize >> 1) + 1, Y + 1), NULL, False);
if (!AViewInfo->IsExpanded)
ACanvas->FillRect(Rect(X, Y - (ASize >> 1), X + 1, Y + (ASize >> 1) + 1), NULL, False);
}
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawIndicatorCell(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListIndicatorViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawIndicatorItem(FCustomDrawInfo->Items[cdaIndicatorCell],
ACanvas, AViewInfo->BoundsRect);
if (AViewInfo->Kind == ikNone) return;
TRect ARect = AViewInfo->BoundsRect;
int X = (ARect.Left + ARect.Right - cxIndicatorImages->Width) >> 1;
int Y = (ARect.Top + ARect.Bottom - cxIndicatorImages->Height) >> 1;
cxIndicatorImages->Draw(ACanvas->Canvas, X, Y, (int)AViewInfo->Kind - 1, true);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawPreview(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListEditCellViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawCellItem(FCustomDrawInfo->Items[cdaPreview], ACanvas, AViewInfo, Sender);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawCell(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListEditCellViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawCellItem(FCustomDrawInfo->Items[cdaCell], ACanvas, AViewInfo, Sender);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListCustomDrawHeader(
TObject *Sender, TcxCanvas *ACanvas, TcxTreeListBandViewInfo *AViewInfo,
bool &ADone)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
ADone = DrawItem(FCustomDrawInfo->Items[cdaHeader], ACanvas, AViewInfo->VisibleRect);
//*/
}
//---------------------------------------------------------------------------
void TCustomDrawDemoMainForm::OwnerDrawCell(TcxTreeListEditCellViewInfo *AViewInfo,
TcxCanvas *ACanvas, TColor ALinesColor, TFont *AFont)
{
ACanvas->Pen->Color = ALinesColor;
ACanvas->Brush->Style = bsClear;
ACanvas->Font = AFont;
TRect ARect = cxRectInflate(AViewInfo->BoundsRect, 0, 1, 0, 0);
ACanvas->Canvas->Rectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);
if (dynamic_cast<TcxCustomTextEditViewInfo*>(AViewInfo->EditViewInfo) != 0)
if (dynamic_cast<TcxCustomCheckBoxViewInfo*>(AViewInfo->EditViewInfo) != 0)
ACanvas->DrawTexT(VarToStr(AViewInfo->DisplayValue),
cxRectInflate(AViewInfo->BoundsRect, -2, -2), 0, true);
else
ACanvas->DrawTexT(
((TcxCustomTextEditViewInfo*)AViewInfo->EditViewInfo)->Text,
cxRectInflate(AViewInfo->BoundsRect, -2, -2), 0, true);
}
bool TCustomDrawDemoMainForm::DrawCellItem(TcxItemCustomDrawInfo *AItem,
TcxCanvas *ACanvas, TcxTreeListEditCellViewInfo *AViewInfo, TObject *Sender)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
bool Result = false;
AViewInfo->Transparent = (AViewInfo->ViewParams.Bitmap != NULL) &&
(!AViewInfo->ViewParams.Bitmap->Empty);
if (AViewInfo->Selected || AItem->DrawingStyle == cdsDefaultDrawing)
return Result;
if (AItem->DrawingStyle == cdsDependsOnData){
TcxStyle *AStyle;
if (AViewInfo->Node->Values[cxDBTreeListVACANCY->ItemIndex])
AStyle = CustomDrawDemoDataDM->styVacancy;
else
AStyle = CustomDrawDemoDataDM->styNoVacancy;
ACanvas->Brush->Color = AStyle->Color;
ACanvas->FillRect(AViewInfo->VisibleRect, NULL, False);
OwnerDrawCell(AViewInfo, ACanvas, AStyle->TextColor, AStyle->Font);
Result = true;
}
else{
Result = DrawItem(AItem, ACanvas, AViewInfo->VisibleRect);
if (AItem->OwnerTextDraw)
OwnerDrawCell(AViewInfo, ACanvas,
((TcxTreeList*)Sender)->OptionsView->GridLineColor, AItem->Font);
else{
AViewInfo->Transparent = true;
Result = false;
}
}
return Result;
//*/
}
//---------------------------------------------------------------------------
bool TCustomDrawDemoMainForm::DrawHeaderItem(TcxItemCustomDrawInfo *AItem,
TcxCanvas *ACanvas, TcxTreeListHeaderViewInfo *AViewInfo, TObject *Sender)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
bool Result = false;
if (AItem->DrawingStyle == cdsDefaultDrawing)
return Result;
Result = DrawIndicatorItem(AItem, ACanvas, AViewInfo->BoundsRect);
ACanvas->Font = AItem->Font;
ACanvas->Brush->Style = bsClear;
ACanvas->DrawTexT(AViewInfo->Text, cxRectInflate(AViewInfo->TextBounds, -2, 0), cxAlignCenter, true);
if (dynamic_cast<TcxTreeListColumnHeaderViewInfo*>(AViewInfo) != 0 &&
((TcxTreeListColumnHeaderViewInfo*)AViewInfo)->SortOrder != Cxcustomdata::soNone ){
bool AAscendingSorting =
((TcxTreeListColumnHeaderViewInfo*)AViewInfo)->SortOrder == soAscending;
int ASign = 2 * (Byte)AAscendingSorting - 1;
int AWidth = 7;
int AHeight = 8;
TRect ARect = ((TcxTreeListColumnHeaderViewInfo*)AViewInfo)->SortMarkBounds;
int X = (ARect.Left + ARect.Right) >> 1;
if (AWidth%2 == 0) X--;
int Y;
if (AAscendingSorting)
Y = (ARect.Top + ARect.Bottom - AHeight) >> 1;
else
Y = ((ARect.Top + ARect.Bottom + AHeight) >> 1) - 1;
int ALeftSide = AWidth >> 1;
if (AWidth%2 == 0) ALeftSide--;
int ARightSide = AWidth >> 1;
ACanvas->Pen->Color = clBtnShadow;
ACanvas->MoveTo(X + ARightSide, Y + ASign * (AHeight - 2));
ACanvas->LineTo(X + ARightSide - ALeftSide, Y);
ACanvas->LineTo(X + ARightSide, Y + ASign * (AHeight - 1));
ACanvas->LineTo(X - ALeftSide, Y + ASign * (AHeight - 1));
ACanvas->LineTo(X, Y);
ACanvas->LineTo(X - ALeftSide, Y + ASign * (AHeight - (int)(AWidth%2!=0)));
}
if (AViewInfo->State == cxbsPressed)
ACanvas->InvertRect(AViewInfo->BoundsRect);
return Result;
//*/
}
//---------------------------------------------------------------------------
bool TCustomDrawDemoMainForm::DrawItem(TcxItemCustomDrawInfo *AItem,
TcxCanvas *ACanvas, const TRect &R)
{
/* remove/add the closing slash on this line to disable/enable the following code*/
switch (AItem->DrawingStyle) {
case cdsBkImage:
ACanvas->FillRect(R, AItem->Bitmap, False);
break;
case cdsGradient:
DrawGradient(ACanvas->Canvas, R,
ColorScheme[(int)AItem->ColorScheme][1],
ColorScheme[(int)AItem->ColorScheme][0], 40,
(int)AItem->ColorScheme > 1);
break;
};
return (AItem->DrawingStyle != cdsDefaultDrawing);
//*/
}
//---------------------------------------------------------------------------
bool TCustomDrawDemoMainForm::DrawIndicatorItem(TcxItemCustomDrawInfo *AItem, TcxCanvas *ACanvas,
const TRect &R)
{
bool Result = DrawItem(AItem, ACanvas, R);
ACanvas->FrameRect(cxRectInflate(R, -1, -1), clBtnText, 1, TcxBorders()<<bLeft<<bTop<<bRight<<bBottom, False);
return Result;
}
//---------------------------------------------------------------------------
void __fastcall TCustomDrawDemoMainForm::cxDBTreeListDragOver(
TObject *Sender, TObject *Source, int X, int Y, TDragState State,
bool &Accept)
{
//
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,540 @@
inherited CustomDrawDemoMainForm: TCustomDrawDemoMainForm
Left = 98
Top = 57
Width = 859
Height = 621
Caption = 'ExpressQuantumTreeList4 CustomDrawDemo'
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
inherited lscrip: TLabel
Width = 851
Height = 25
AutoSize = False
Caption =
'This demo shows some examples of custom draw. See Help/About reg' +
'arding the various Options available above.'
Font.Color = 11618330
end
inherited sbMain: TStatusBar
Top = 548
Width = 851
end
inherited memAboutText: TMemo
Lines.Strings = (
'In this demo you can:'
''
'- apply different custom draw techniques to the following tree l' +
'ist elements (see the Options/'#39'Show Custom Draw Editor...'#39'):'
''
' Background'
' BandHeader'
' Cell'
' CellsGroup'
' Footer'
' FooterCell'
' Header'
' HeaderCell'
' IndentCell'
' IndicatorCell'
' Preview'
''
'- NOTE: if you haven'#39't done so already, you might like to practi' +
'ce by completing the tutorial version of this demo (see the tuto' +
'rials folder)')
TabOrder = 2
end
object cxDBTreeList: TcxDBTreeList [3]
Left = 0
Top = 25
Width = 851
Height = 523
Styles.StyleSheet = CustomDrawDemoDataDM.TreeListStyleSheetDevExpress
Align = alClient
Bands = <
item
Caption.AlignHorz = taCenter
Caption.Text = 'Common department info'
Width = 201
end
item
Caption.AlignHorz = taCenter
Caption.Text = 'Detailed department info'
Width = 220
end
item
Caption.AlignHorz = taCenter
Caption.Text = 'Manager info'
Width = 339
end>
BufferedPaint = True
DataController.DataSource = CustomDrawDemoDataDM.dsDepartments
DataController.ParentField = 'PARENTID'
DataController.KeyField = 'ID'
DragMode = dmAutomatic
OptionsBehavior.AutomateLeftMostIndent = False
OptionsData.Inserting = True
OptionsView.Bands = True
OptionsView.Footer = True
OptionsView.GridLineColor = 14916958
OptionsView.GridLines = tlglBoth
OptionsView.Indicator = True
OptionsView.UseNodeColorForIndent = False
Preview.Column = cxDBTreeListManagerAdress
Preview.Visible = True
RootValue = 255
TabOrder = 1
OnCustomDrawBackground = cxDBTreeListCustomDrawBackground
OnCustomDrawBandHeader = cxDBTreeListCustomDrawBandHeader
OnCustomDrawCell = cxDBTreeListCustomDrawCell
OnCustomDrawCellsGroup = cxDBTreeListCustomDrawCellsGroup
OnCustomDrawFooter = cxDBTreeListCustomDrawFooter
OnCustomDrawFooterCell = cxDBTreeListCustomDrawFooterCell
OnCustomDrawHeader = cxDBTreeListCustomDrawHeader
OnCustomDrawHeaderCell = cxDBTreeListCustomDrawHeaderCell
OnCustomDrawIndentCell = cxDBTreeListCustomDrawIndentCell
OnCustomDrawIndicatorCell = cxDBTreeListCustomDrawIndicatorCell
OnCustomDrawPreview = cxDBTreeListCustomDrawPreview
OnDragOver = cxDBTreeListDragOver
OnInitInsertingRecord = cxDBTreeListInitInsertingRecord
object cxDBTreeListID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'ID'
DataBinding.FieldName = 'ID'
Width = 63
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListPARENTID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'PARENTID'
DataBinding.FieldName = 'PARENTID'
Width = 62
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListNAME: TcxDBTreeListColumn
PropertiesClassName = 'TcxMemoProperties'
Caption.Text = 'NAME'
DataBinding.FieldName = 'NAME'
Options.Footer = True
Width = 259
Position.ColIndex = 0
Position.LineCount = 2
Position.RowIndex = 0
Position.BandIndex = 0
SummaryFooter.Kind = skCount
end
object cxDBTreeListPHONE: TcxDBTreeListColumn
RepositoryItem = eriTelephoneMaskEdit
Caption.Text = 'PHONE'
DataBinding.FieldName = 'PHONE'
Width = 167
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
end
object cxDBTreeListFAX: TcxDBTreeListColumn
RepositoryItem = eriTelephoneMaskEdit
Caption.Text = 'FAX'
DataBinding.FieldName = 'FAX'
Width = 90
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 1
end
object cxDBTreeListBUDGET: TcxDBTreeListColumn
Caption.Text = 'BUDGET'
DataBinding.FieldName = 'BUDGET'
Options.Footer = True
Width = 86
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 1
SummaryFooter.Kind = skSum
end
object cxDBTreeListVACANCY: TcxDBTreeListColumn
Caption.Text = 'VACANCY'
DataBinding.FieldName = 'VACANCY'
Width = 77
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 1
end
object cxDBTreeListManager: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.ImmediatePost = True
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Name'
end>
Properties.ListSource = CustomDrawDemoDataDM.dsPersons
Caption.Text = 'Manager'
DataBinding.FieldName = 'MANAGERID'
Width = 84
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 2
end
object cxDBTreeListManagerPhone: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Phone'
end>
Properties.ListSource = CustomDrawDemoDataDM.dsPersons
Properties.ReadOnly = False
Caption.Text = 'Manager Phone'
DataBinding.FieldName = 'MANAGERID'
Width = 103
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 2
end
object cxDBTreeListManagerEmail: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'EMAIL'
end>
Properties.ListSource = CustomDrawDemoDataDM.dsPersons
Properties.ReadOnly = False
Caption.Text = 'Manager Email'
DataBinding.FieldName = 'MANAGERID'
Width = 152
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 2
end
object cxDBTreeListManagerAdress: TcxDBTreeListColumn
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'ID'
Properties.ListColumns = <
item
FieldName = 'Address'
end>
Properties.ListSource = CustomDrawDemoDataDM.dsPersons
DataBinding.FieldName = 'MANAGERID'
Width = 67
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
end
inherited mmMain: TMainMenu
inherited miOptions: TMenuItem
object miShowCustomDrawEditor: TMenuItem [0]
Caption = 'Show &Custom Draw Editor...'
Hint = 'Shows the CustomDraw customization form'
OnClick = actCustomizationFormExecute
end
object miSeparator1: TMenuItem [1]
Caption = '-'
end
object miGridLookFeel: TMenuItem [2]
Caption = '&Look&&Feel'
object miKind: TMenuItem
Caption = '&Kind'
object miFlat: TMenuItem
Caption = '&Flat'
GroupIndex = 1
Hint = 'Setting this option changes the demo appearance to Flat style'
RadioItem = True
OnClick = LookAndFeelChange
end
object miStandard: TMenuItem
Tag = 1
Caption = '&Standard'
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Standard styl' +
'e'
RadioItem = True
OnClick = LookAndFeelChange
end
object miUltraFlat: TMenuItem
Tag = 2
Caption = '&Ultra Flat'
Checked = True
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Ultra Flat st' +
'yle'
RadioItem = True
OnClick = LookAndFeelChange
end
object Office111: TMenuItem
Tag = 3
Caption = 'Office 11'
GroupIndex = 1
OnClick = LookAndFeelChange
end
end
object miNativeStyle: TMenuItem
Tag = 4
Caption = '&Native Style'
Hint = 'Setting this option changes the demo appearance to Native style'
OnClick = LookAndFeelChange
end
end
object miSeparator2: TMenuItem [3]
Caption = '-'
end
end
end
object cxEditRepository1: TcxEditRepository
Left = 432
Top = 48
object eriTelephoneMaskEdit: TcxEditRepositoryMaskItem
Properties.MaskKind = emkRegExprEx
Properties.EditMask = '(\((\d\d\d)?\))? \d(\d\d?)? - \d\d(\d\d)?( - \d\d)?'
end
end
object imIndicatorImages: TImageList
Height = 12
Width = 12
Left = 560
Top = 8
Bitmap = {
494C01010400090004000C000C00FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
000000000000360000002800000030000000240000000100200000000000001B
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000FF000000FF000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000FF000000FF000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000FF000000FF000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000FF000000FF000000FF000000
FF00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000FF000000FF000000FF000000
FF00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FF000000FF000000FF000000FF000000
FF000000FF000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FF000000FF000000FF000000FF000000
FF000000FF000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FF000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF000000FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FF000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF000000FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FF000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF000000FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FF000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF000000FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FF000000FF000000FF000000FF000000FF000000FF000000
FF000000FF000000FF000000FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FF000000FF000000FF000000FF000000
FF000000FF000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FF000000FF000000FF000000FF0000000000000000000000
FF000000FF000000FF000000FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000FF000000FF000000FF000000
FF00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000FF000000FF000000000000000000000000000000
00000000FF000000FF0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000FF000000FF000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000424D3E000000000000003E000000
2800000030000000240000000100010000000000200100000000000000000000
000000000000000000000000FFFFFF0000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000E07F9F801FFF0000F0FF9FE07F9F0000
F9FF0FF0FF0F0000F9FE07C03E070000999C03801C030000000C038018010000
0008018018010000999801C03C030000F0F801E07E070000E07861F0FF0F0000
F0FCF3F9FF9F0000F9FFFFF9FFFF000000000000000000000000000000000000
000000000000}
end
end

View File

@ -0,0 +1,183 @@
//---------------------------------------------------------------------------
#ifndef CustomDrawDemoMainH
#define CustomDrawDemoMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxStyles.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <DB.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include "cxLookAndFeels.hpp"
#include "DemoBasicMain.h"
#include "CustomDrawDemoTypes.h"
#include "cxCheckBox.hpp"
#include "cxCurrencyEdit.hpp"
#include "cxDBLookupComboBox.hpp"
#include "cxDBTL.hpp"
#include "cxEditRepositoryItems.hpp"
#include "cxInplaceContainer.hpp"
#include "cxMaskEdit.hpp"
#include "cxMemo.hpp"
#include "cxTL.hpp"
#include "cxTLData.hpp"
#include "cxTextEdit.hpp"
//---------------------------------------------------------------------------
class TcxItemCustomDrawInfo;
class TcxCustomDrawInfo {
private:
TList *FBitmaps;
TFont *FDefaultFont;
TList *FCustomDrawData;
Graphics::TBitmap* GetBkBitmap(TBkImage ABkImage);
int GetCount(void);
TcxItemCustomDrawInfo* GetItem(TCustomDrawArea ADrawArea);
void LoadResourceBitmaps();
public:
__fastcall TcxCustomDrawInfo();
__fastcall ~TcxCustomDrawInfo();
void AddNewItem(TCustomDrawArea ADrawArea, TcxItemCustomDrawType AItemType);
TcxItemCustomDrawInfo* GetItemByIndex(int AIndex);
__property Graphics::TBitmap* Bitmaps[TBkImage ABkImage] = {read=GetBkBitmap};
__property int Count = {read=GetCount};
__property TFont* DefaultFont = {read=FDefaultFont};
__property TcxItemCustomDrawInfo* Items[TCustomDrawArea ADrawArea] = {read = GetItem};
};
class TcxItemCustomDrawInfo {
private:
TcxCustomDrawInfo *FOwner;
Graphics::TBitmap *FBitmap;
TBkImage FBkImageType;
TCustomDrawArea FDrawArea;
TCustomDrawingStyle FDrawingStyle;
TcxColorScheme FColorScheme;
TFont *FFont;
bool FIsBitmapAssigned;
bool FIsFontAssigned;
bool FOwnerTextDraw;
TcxItemCustomDrawType FItemType;
Graphics::TBitmap* GetBitmap();
TFont* GetFont();
void SetBitmap(Graphics::TBitmap *Value);
void SetFont(TFont *Value);
public:
__fastcall TcxItemCustomDrawInfo(TcxCustomDrawInfo *AOwner, TCustomDrawArea ADrawArea,
TcxItemCustomDrawType AItemType);
__fastcall ~TcxItemCustomDrawInfo();
__property TcxCustomDrawInfo *Owner = {read=FOwner};
__property Graphics::TBitmap *Bitmap = {read=GetBitmap, write=SetBitmap};
__property TBkImage BkImageType = {read=FBkImageType, write=FBkImageType};
__property TCustomDrawArea DrawArea = {read=FDrawArea};
__property TCustomDrawingStyle DrawingStyle = {read=FDrawingStyle, write=FDrawingStyle};
__property TcxColorScheme ColorScheme = {read=FColorScheme, write=FColorScheme};
__property TFont *Font = {read=GetFont, write=SetFont};
__property TcxItemCustomDrawType ItemType = {read=FItemType};
__property bool OwnerTextDraw = {read=FOwnerTextDraw, write=FOwnerTextDraw};
};
//---------------------------------------------------------------------------
class TCustomDrawDemoMainForm : public TDemoBasicMainForm
{
__published: // IDE-managed Components
TMenuItem *miFlat;
TMenuItem *miUltraFlat;
TMenuItem *miStandard;
TMenuItem *miNativeStyle;
TMenuItem *miGridLookFeel;
TMenuItem *miSeparator2;
TcxEditRepository *cxEditRepository1;
TcxEditRepositoryMaskItem *eriTelephoneMaskEdit;
TcxDBTreeList *cxDBTreeList;
TcxDBTreeListColumn *cxDBTreeListID;
TcxDBTreeListColumn *cxDBTreeListPARENTID;
TcxDBTreeListColumn *cxDBTreeListNAME;
TcxDBTreeListColumn *cxDBTreeListPHONE;
TcxDBTreeListColumn *cxDBTreeListFAX;
TcxDBTreeListColumn *cxDBTreeListBUDGET;
TcxDBTreeListColumn *cxDBTreeListVACANCY;
TcxDBTreeListColumn *cxDBTreeListManager;
TcxDBTreeListColumn *cxDBTreeListManagerPhone;
TcxDBTreeListColumn *cxDBTreeListManagerEmail;
TcxDBTreeListColumn *cxDBTreeListManagerAdress;
void __fastcall FormShow(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
void __fastcall FormDestroy(TObject *Sender);
void __fastcall actCustomizationFormExecute(TObject *Sender);
void __fastcall LookAndFeelChange(TObject *Sender);
void __fastcall cxDBTreeListInitInsertingRecord(TObject *Sender,
TcxTreeListDataNode *AFocusedNode, bool &AHandled);
void __fastcall cxDBTreeListCustomDrawBackground(TObject *Sender,
TcxCanvas *ACanvas, const TRect &R, bool &ADone);
void __fastcall cxDBTreeListCustomDrawBandHeader(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListHeaderViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawCellsGroup(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListCellsGroupViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawFooter(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListBandViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawFooterCell(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListFooterItemViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawHeaderCell(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListHeaderViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawIndentCell(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListIndentViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawIndicatorCell(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListIndicatorViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawPreview(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListEditCellViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawCell(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListEditCellViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListCustomDrawHeader(TObject *Sender,
TcxCanvas *ACanvas, TcxTreeListBandViewInfo *AViewInfo,
bool &ADone);
void __fastcall cxDBTreeListDragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept);
private:
TcxCustomDrawInfo *FCustomDrawInfo;
void AddCustomDrawInfos();
void AdjustCustomDrawItems();
bool DrawCellItem(TcxItemCustomDrawInfo *AItem, TcxCanvas *ACanvas,
TcxTreeListEditCellViewInfo *AViewInfo, TObject *Sender);
bool DrawHeaderItem(TcxItemCustomDrawInfo *AItem, TcxCanvas *ACanvas,
TcxTreeListHeaderViewInfo *AViewInfo, TObject *Sender);
bool DrawItem(TcxItemCustomDrawInfo *AItem, TcxCanvas *ACanvas,
const TRect &R);
bool DrawIndicatorItem(TcxItemCustomDrawInfo *AItem, TcxCanvas *ACanvas,
const TRect &R);
void DrawTreeLines(TcxTreeListIndentViewInfo *AViewInfo, TcxCanvas *ACanvas);
void DrawRectWithBorders(TcxCanvas *ACanvas, TcxBorders ABorders,
TColor AColor, const TRect &ARect);
void OwnerDrawCell(TcxTreeListEditCellViewInfo *AViewInfo, TcxCanvas *ACanvas,
TColor ALinesColor, TFont *AFont);
public:
__property TcxCustomDrawInfo *CustomDrawInfo = {read=FCustomDrawInfo};
__fastcall TCustomDrawDemoMainForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TCustomDrawDemoMainForm *CustomDrawDemoMainForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,70 @@
#include "CustomDrawDemoTypes.h"
const TcxColorSchemeArr ColorScheme = {{clSilver, clWhite, clGray},
{clGold, clGreyLight, clGoldDark},
{clBlueDark, clBlueLight, clBlueDark},
{clGreenDark, clGreenLight, clGreen}};
const String BkImageResNames[BkImageCount] = {"TILE", "SKY", "EGYPT", "MYFACE", "CAR"};
const String ColorSchemeNames[ColorSchemeCount] = {"Grey", "Gold", "Blue", "Green"};
const String CustomDrawAreaNames[CustomDrawAreaCount] = {"Background",
"BandHeader", "Cell", "CellsGroup", "Footer", "FooterCell", "Header",
"HeaderCell", "IndentCell", "IndicatorCell", "Preview"};
void DrawGradient(TCanvas* ACanvas, TRect ARect, TColor FromColor, TColor ToColor,
int AStepCount, bool IsVertical)
{
Byte R, G, B;
Byte FromR = GetRValue(FromColor);
Byte FromG = GetGValue(FromColor);
Byte FromB = GetBValue(FromColor);
Byte ToR = GetRValue(ToColor);
Byte ToG = GetGValue(ToColor);
Byte ToB = GetBValue(ToColor);
TRect SR = ARect;
int H;
if (IsVertical)
H = ARect.Bottom - ARect.Top;
else
H = ARect.Right - ARect.Left;
for(int i = 0; i < AStepCount; i++) {
if (IsVertical)
SR.Bottom = ARect.Top + MulDiv(i + 1, H, AStepCount);
else
SR.Right = ARect.Left + MulDiv(i + 1, H, AStepCount);
R = (byte)(FromR + MulDiv(i, ToR - FromR, AStepCount - 1));
G = (byte)(FromG + MulDiv(i, ToG - FromG, AStepCount - 1));
B = (byte)(FromB + MulDiv(i, ToB - FromB, AStepCount - 1));
ACanvas->Brush->Color = (TColor)RGB(R, G, B);
ACanvas->FillRect(SR);
if (IsVertical)
SR.Top = SR.Bottom;
else
SR.Left = SR.Right;
}
}
void LoadImageFromRes(Graphics::TBitmap* ABitmap, String AResName)
{
Graphics::TBitmap* Bitmap = new Graphics::TBitmap();
TResourceStream* Rs = new TResourceStream((int)HInstance, AResName, RT_RCDATA);
try {
Bitmap->LoadFromStream(Rs);
ABitmap->Assign(Bitmap);
}
__finally {
delete Bitmap;
delete Rs;
}
}

View File

@ -0,0 +1,53 @@
#include "..\cxDemosBCB.inc"
#include "Windows.hpp"
#if BCB6
#include "Types.hpp"
#endif
#include "Graphics.hpp"
#ifndef CustomDrawDemoTypesH
#define CustomDrawDemoTypesH
enum TcxItemCustomDrawType {itNormal, itText, itCell};
enum TCustomDrawingStyle {cdsBkImage, cdsGradient, cdsDefaultDrawing, cdsDependsOnData};
enum TCustomDrawArea {cdaBackground, cdaBandHeader, cdaCell, cdaCellsGroup,
cdaFooter, cdaFooterCell, cdaHeader, cdaHeaderCell, cdaIndentCell,
cdaIndicatorCell, cdaPreview};
const CustomDrawAreaCount = 11;
enum TcxColorScheme {csGrey, csGold, csBlue, csGreen};
const ColorSchemeCount = 4;
enum TBkImage {bkiTile, bkiSky, bkiEgypt, bkiMyFace, bkiUserDefined};
const BkImageCount = 5;
typedef TColor TcxColorSchemeArr[4][3];
const TColor clBlueDark = 0x00C56A31;
const TColor clBlueLight = 0x00F7EAD9;
const TColor clBlueBright = 0x00FF953D;
const TColor clBlueSky = 0x00EBC4A4;
const TColor clGold = 0x0047D5FE;
const TColor clGoldDark = 0x0001BDF3;
const TColor clGreyLight = 0x00E2EFF1;
const TColor clGreyDark = 0x00B9D9DD;
const TColor clYellowLight = 0x00E1FFFF;
const TColor clGreenBright = 0x0082E887;
const TColor clGreenLight = 0x00C9F5CB;
const TColor clGreenObscured = 0x00ACF0AF;
const TColor clGreenDark = 0x0044DD4B;
const TColor clSilverDark = 0x00A6A6A6;
extern const TcxColorSchemeArr ColorScheme;
extern const String BkImageResNames[BkImageCount];
extern const String ColorSchemeNames[ColorSchemeCount];
extern const String CustomDrawAreaNames[CustomDrawAreaCount];
void DrawGradient(TCanvas* ACanvas, TRect ARect, TColor FromColor, TColor ToColor,
int AStepCount, bool IsVertical);
void LoadImageFromRes(Graphics::TBitmap* ABitmap, String AResName);
#endif

View File

@ -0,0 +1,43 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USERES("DragDropDemo.res");
USEFORM("DragDropDemoMain.cpp", DragDropDemoMainForm);
USEFORM("DragDropDemoData.cpp", DragDropDemoDataDM); /* TDataModule: File Type */
USEFORM("..\Common\DemoRating.cpp", DemoRatingForm);
USEFORM("..\Common\DemoBasicAbout.cpp", DemoBasicAboutForm);
USEFORM("..\Common\DemoBasicMain.cpp", DemoBasicMainForm);
USEFORM("DragDropDemoDictionary.cpp", DragDropDemoDictionaryForm);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->HelpFile = "..\\..\\Help\\EQTreeList4.hlp";
Application->Title = "ExpressQuantumTreeList4 DragDropDemo";
Application->CreateForm(__classid(TDragDropDemoDataDM), &DragDropDemoDataDM);
Application->CreateForm(__classid(TDragDropDemoMainForm), &DragDropDemoMainForm);
Application->CreateForm(__classid(TDragDropDemoDictionaryForm), &DragDropDemoDictionaryForm);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppVCLApplication</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.node" name="name" value="DragDropDemo.exe"/>
<property category="build.node" name="sparelibs" value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.1" value="$(SYSDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.2" value="$(USERDEFINES)"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.3" value="NO_WIN32_LEAN_AND_MEAN"/>
<property category="win32.*.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BCB)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BCB)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.5" value="$(BCB)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.6" value="..\Common"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BCB)\lib\release"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BCB)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.4" value="$(BCB)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.5" value="..\..\..\..\Library\CBuilder10"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.1" value="..\Common"/>
<property category="win32.*.win32b.ilink32" name="option.j.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.j.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.1" value="."/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.outputdir.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.1" value="$(LIBRARIES)"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.2" value="import32.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.3" value="cp32mt.lib"/>
<property category="win32.*.win32b.ilink32" name="param.libfiles.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.1" value="c0w32.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.2" value="Memmgr.Lib"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.3" value="$(PACKAGES)"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.4" value="sysinit.obj"/>
<property category="win32.*.win32b.ilink32" name="param.objfiles.merge" value="1"/>
</optionset>
</project>
</BCBPROJECT>
<Source>
<Source Name="MainSource">DragDropDemo.cpp</Source>
</Source>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.10.00"/>
<PROJECT value="DragDropDemo.exe"/>
<OBJFILES value="DragDropDemo.obj DragDropDemoMain.obj DragDropDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj DragDropDemoDictionary.obj"/>
<RESFILES value="DragDropDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) DragDropDemoMain.dfm DragDropDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm DragDropDemoDictionary.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryc10.lib dxgdiplusc10.lib dxthemec10.lib cxtreelistc10.lib cxeditorsc10.lib cxexportc10.lib cxdatac10.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="DragDropDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder10"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder10"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl100.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.05.03"/>
<PROJECT value="DragDropDemo.exe"/>
<OBJFILES value="DragDropDemo.obj DragDropDemoMain.obj DragDropDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj DragDropDemoDictionary.obj"/>
<RESFILES value="DragDropDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) DragDropDemoMain.dfm DragDropDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm DragDropDemoDictionary.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<SPARELIBS value="vcl50.lib vcldb50.lib vclbde50.lib cxlibraryvclc5.lib dxgdiplusc5.lib dxthemec5.lib cxtreelistc5.lib cxeditorsc5.lib cxexportc5.lib cxdatac5.lib vcljpg50.lib vclx50.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="DragDropDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder5"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder5"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--C++Builder XML Project-->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="DragDropDemo.exe"/>
<OBJFILES value="DragDropDemo.obj DragDropDemoMain.obj DragDropDemoData.obj ..\Common\DemoRating.obj ..\Common\DemoBasicAbout.obj ..\Common\DemoBasicMain.obj DragDropDemoDictionary.obj"/>
<RESFILES value="DragDropDemo.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) DragDropDemoMain.dfm DragDropDemoData.dfm ..\Common\DemoRating.dfm ..\Common\DemoBasicAbout.dfm ..\Common\DemoBasicMain.dfm DragDropDemoDictionary.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<SPARELIBS value="vcl.lib rtl.lib vcldb.lib dbrtl.lib bdertl.lib adortl.lib cxlibraryvclc6.lib dxgdiplusc6.lib dxthemec6.lib cxtreelistvclc6.lib cxeditorsvclc6.lib cxexportvclc6.lib cxdatac6.lib vcljpg.lib vclx.lib "/>
<PACKAGES value=""/>
<PATHCPP value=".;..\Common"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="iLink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
<MAINSOURCE value="DragDropDemo.cpp"/>
<INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\Library\CBuilder6"/>
<LIBPATH value="$(BCB)\lib\obj;$(BCB)\lib;..\..\..\..\Library\CBuilder6"/>
<WARNINGS value="-w-par"/>
<WARNOPTSTR value=""/>
</MACROS>
<OPTIONS>
<CFLAG1 value="-I$(BCB)\include;$(BCB)\include\vcl;..\Common -Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM -D$(SYSDEFINES);$(USERDEFINES)"/>
<LFLAGS value="-L$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;..\Common;$(DEBUGLIBPATH) -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib "/>
</LINKER>
<IDEOPTIONS/>
</PROJECT>

View File

@ -0,0 +1,27 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DragDropDemoData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxStyles"
#pragma link "cxTL"
#pragma resource "*.dfm"
TDragDropDemoDataDM *DragDropDemoDataDM;
//---------------------------------------------------------------------------
__fastcall TDragDropDemoDataDM::TDragDropDemoDataDM(TComponent* Owner)
: TDataModule(Owner)
{
}
//---------------------------------------------------------------------------
void TDragDropDemoDataDM::SetParentValue(Variant AValue)
{
if (tblDepartments->State == dsEdit || tblDepartments->State == dsInsert)
tblDepartments->FindField("ParentID")->Value = AValue;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,275 @@
object DragDropDemoDataDM: TDragDropDemoDataDM
Left = 492
Top = 273
Height = 315
Width = 325
object Database: TDatabase
Connected = True
DatabaseName = 'DemosDB'
DriverName = 'STANDARD'
Params.Strings = (
'PATH=..\..\Data'
'DEFAULT DRIVER=PARADOX'
'ENABLE BCD=FALSE')
SessionName = 'Default'
Left = 40
Top = 8
end
object tblDepartments: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'DEPARTMENTS.DB'
Left = 32
Top = 64
object tblDepartmentsID: TAutoIncField
FieldName = 'ID'
ReadOnly = True
Visible = False
end
object tblDepartmentsPARENTID: TIntegerField
FieldName = 'PARENTID'
Visible = False
end
object tblDepartmentsNAME: TStringField
FieldName = 'NAME'
Size = 50
end
object tblDepartmentsBUDGET: TFloatField
FieldName = 'BUDGET'
end
object tblDepartmentsPHONE: TStringField
FieldName = 'PHONE'
Size = 50
end
object tblDepartmentsFAX: TStringField
FieldName = 'FAX'
Size = 50
end
object tblDepartmentsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 255
end
object tblDepartmentsVACANCY: TBooleanField
FieldName = 'VACANCY'
end
end
object dsDepartments: TDataSource
DataSet = tblDepartments
Left = 32
Top = 112
end
object tblPersons: TTable
Active = True
DatabaseName = 'DemosDB'
IndexFieldNames = 'DepartmentID'
MasterFields = 'ID'
MasterSource = dsDepartments
TableName = 'PERSONS.DB'
Left = 120
Top = 64
object tblPersonsID: TAutoIncField
FieldName = 'ID'
ReadOnly = True
end
object tblPersonsName: TStringField
FieldName = 'Name'
Size = 50
end
object tblPersonsCountry: TStringField
FieldName = 'Country'
Size = 15
end
object tblPersonsPostalCode: TStringField
FieldName = 'PostalCode'
Size = 10
end
object tblPersonsCity: TStringField
FieldName = 'City'
Size = 15
end
object tblPersonsAddress: TStringField
FieldName = 'Address'
Size = 100
end
object tblPersonsPhone: TStringField
FieldName = 'Phone'
Size = 24
end
object tblPersonsFax: TStringField
FieldName = 'Fax'
Size = 24
end
object tblPersonsEMAIL: TStringField
FieldName = 'EMAIL'
Size = 100
end
object tblPersonsHOMEPAGE: TStringField
FieldName = 'HOMEPAGE'
Size = 100
end
object tblPersonsDepartmentID: TIntegerField
FieldName = 'DepartmentID'
end
end
object dsPersons: TDataSource
DataSet = tblPersons
Left = 120
Top = 112
end
object StyleRepository: TcxStyleRepository
Left = 160
Top = 8
object cxStyle1: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle2: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle3: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clWhite
end
object cxStyle4: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15252642
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = 11032875
end
object cxStyle5: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle6: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15784893
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle7: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 16247513
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
TextColor = clBlack
end
object cxStyle8: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle9: TcxStyle
AssignedValues = [svColor]
Color = 15451300
end
object cxStyle10: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 4707838
TextColor = clBlack
end
object cxStyle11: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 15451300
TextColor = clBlack
end
object cxStyle12: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 14811135
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clNavy
end
object cxStyle13: TcxStyle
AssignedValues = [svColor, svTextColor]
Color = 16048336
TextColor = clBlack
end
object stlGroupNode: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 15253902
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
TextColor = clWhite
end
object stlFixedBand: TcxStyle
AssignedValues = [svColor]
Color = 15322014
end
object TreeListStyleSheetDevExpress: TcxTreeListStyleSheet
Caption = 'DevExpress'
Styles.Background = cxStyle1
Styles.Content = cxStyle5
Styles.Inactive = cxStyle9
Styles.Selection = cxStyle13
Styles.BandBackground = cxStyle2
Styles.BandHeader = cxStyle3
Styles.ColumnHeader = cxStyle4
Styles.ContentEven = cxStyle7
Styles.ContentOdd = cxStyle6
Styles.Footer = cxStyle8
Styles.IncSearch = cxStyle10
Styles.Indicator = cxStyle11
Styles.Preview = cxStyle12
BuiltIn = True
end
end
object tblDeptDict: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'DEPARTMENTS.DB'
Left = 32
Top = 176
end
object dsDeptDict: TDataSource
DataSet = tblDeptDict
Left = 32
Top = 224
end
object dsPersDict: TDataSource
DataSet = tblPersDict
Left = 120
Top = 224
end
object tblPersDict: TTable
Active = True
DatabaseName = 'DemosDB'
TableName = 'PERSONS.DB'
Left = 120
Top = 176
end
end

View File

@ -0,0 +1,72 @@
//---------------------------------------------------------------------------
#ifndef DragDropDemoDataH
#define DragDropDemoDataH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxClasses.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include "cxTL.hpp"
#include <DBTables.hpp>
//---------------------------------------------------------------------------
class TDragDropDemoDataDM : public TDataModule
{
__published: // IDE-managed Components
TDatabase *DataBase;
TTable *tblDepartments;
TAutoIncField *tblDepartmentsID;
TIntegerField *tblDepartmentsPARENTID;
TStringField *tblDepartmentsNAME;
TFloatField *tblDepartmentsBUDGET;
TStringField *tblDepartmentsPHONE;
TStringField *tblDepartmentsFAX;
TStringField *tblDepartmentsEMAIL;
TBooleanField *tblDepartmentsVACANCY;
TDataSource *dsDepartments;
TTable *tblPersons;
TAutoIncField *tblPersonsID;
TStringField *tblPersonsName;
TStringField *tblPersonsCountry;
TStringField *tblPersonsPostalCode;
TStringField *tblPersonsCity;
TStringField *tblPersonsAddress;
TStringField *tblPersonsPhone;
TStringField *tblPersonsFax;
TStringField *tblPersonsEMAIL;
TStringField *tblPersonsHOMEPAGE;
TIntegerField *tblPersonsDepartmentID;
TDataSource *dsPersons;
TcxStyleRepository *StyleRepository;
TcxStyle *cxStyle1;
TcxStyle *cxStyle2;
TcxStyle *cxStyle3;
TcxStyle *cxStyle4;
TcxStyle *cxStyle5;
TcxStyle *cxStyle6;
TcxStyle *cxStyle7;
TcxStyle *cxStyle8;
TcxStyle *cxStyle9;
TcxStyle *cxStyle10;
TcxStyle *cxStyle11;
TcxStyle *cxStyle12;
TcxStyle *cxStyle13;
TcxStyle *stlGroupNode;
TcxStyle *stlFixedBand;
TcxTreeListStyleSheet *TreeListStyleSheetDevExpress;
TTable *tblDeptDict;
TDataSource *dsDeptDict;
TDataSource *dsPersDict;
TTable *tblPersDict;
private: // User declarations
public: // User declarations
__fastcall TDragDropDemoDataDM(TComponent* Owner);
void SetParentValue(Variant AValue);
};
//---------------------------------------------------------------------------
extern PACKAGE TDragDropDemoDataDM *DragDropDemoDataDM;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,85 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DragDropDemoDictionary.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxCheckBox"
#pragma link "cxControls"
#pragma link "cxCurrencyEdit"
#pragma link "cxCustomData"
#pragma link "cxDBTL"
#pragma link "cxGraphics"
#pragma link "cxInplaceContainer"
#pragma link "cxMaskEdit"
#pragma link "cxStyles"
#pragma link "cxTL"
#pragma link "cxTLData"
#pragma resource "*.dfm"
TDragDropDemoDictionaryForm *DragDropDemoDictionaryForm;
int _fastcall cxCompareNodes(void *AItem1, void *AItem2)
{
return ((TcxTreeListDataNode*)AItem2)->KeyValue -
((TcxTreeListDataNode*)AItem1)->KeyValue;
}
void SetSelectedNodesValue(TcxDBTreeList *ATreeList, int AItemIndex,
Variant AValue)
{
TList *AList = new TList();
ATreeList->BeginUpdate();
__try{
ATreeList->GetSelections(AList);
AList->Sort(cxCompareNodes);
for (int I = 0; I < AList->Count; I++)
if (((TcxTreeListNode*)AList->Items[I])->Values[AItemIndex] != AValue){
((TcxTreeListNode*)AList->Items[I])->Focused = true;
ATreeList->DataController->Edit();
((TcxTreeListNode*)AList->Items[I])->Values[AItemIndex] = AValue;
ATreeList->DataController->Post();
}
}
__finally{
delete AList;
ATreeList->EndUpdate();
}
}
//---------------------------------------------------------------------------
__fastcall TDragDropDemoDictionaryForm::TDragDropDemoDictionaryForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoDictionaryForm::tlDictDragOver(TObject *Sender,
TObject* Source, int X, int Y, TDragState State, bool &Accept)
{
Accept = false;
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoDictionaryForm::tlDictMoveTo(TObject *Sender,
TcxTreeListNode *AttachNode, TcxTreeListNodeAttachMode AttachMode,
TList *Nodes, bool &IsCopy, bool &Done)
{
Done = true;
}
//---------------------------------------------------------------------------
void TDragDropDemoDictionaryForm::SetDeptSelectionParentValue(Variant AParentValue)
{
SetSelectedNodesValue(tlDeptDict, tlDeptDictPARENTID->ItemIndex, AParentValue);
}
//---------------------------------------------------------------------------
void TDragDropDemoDictionaryForm::SetEmplSelectionDeptID(Variant ADepartmentID)
{
SetSelectedNodesValue(tlEmplDict, tlEmplDictDepartmentID->ItemIndex, ADepartmentID);
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,272 @@
object DragDropDemoDictionaryForm: TDragDropDemoDictionaryForm
Left = 158
Top = 119
Width = 504
Height = 397
Caption = 'Dictionaries'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsStayOnTop
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object pcDictionary: TPageControl
Left = 0
Top = 0
Width = 496
Height = 363
ActivePage = tsPersons
Align = alClient
MultiLine = True
TabOrder = 0
object tsDepartments: TTabSheet
Caption = 'Departments'
object lsc: TLabel
Left = 0
Top = 0
Width = 488
Height = 48
Align = alTop
Caption =
'Multiselect and drag rows from the list below, then drop them on' +
'to the necessary place of the Departments hierarchy displayed by' +
' the main form '
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
WordWrap = True
end
object tlDeptDict: TcxDBTreeList
Left = 0
Top = 48
Width = 488
Height = 287
Styles.StyleSheet = DragDropDemoDataDM.TreeListStyleSheetDevExpress
Align = alClient
Bands = <
item
Caption.Text = 'Band + 1'
end>
BufferedPaint = False
DataController.DataSource = DragDropDemoDataDM.dsDeptDict
DataController.ParentField = 'ID'
DataController.KeyField = 'ID'
DragMode = dmAutomatic
OptionsBehavior.ImmediateEditor = False
OptionsBehavior.AutomateLeftMostIndent = False
OptionsBehavior.IncSearchItem = tlDeptDictNAME
OptionsBehavior.DragDropText = True
OptionsBehavior.IncSearch = True
OptionsData.Inserting = True
OptionsSelection.MultiSelect = True
OptionsView.Indicator = True
OptionsView.ShowRoot = False
RootValue = 255
TabOrder = 0
OnDragOver = tlDictDragOver
OnMoveTo = tlDictMoveTo
object tlDeptDictPARENTID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'PARENTID'
DataBinding.FieldName = 'PARENTID'
Position.ColIndex = 6
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDeptDictNAME: TcxDBTreeListColumn
Caption.Text = 'NAME'
DataBinding.FieldName = 'NAME'
Width = 177
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
SortOrder = soAscending
end
object tlDeptDictBUDGET: TcxDBTreeListColumn
Caption.Text = 'BUDGET'
DataBinding.FieldName = 'BUDGET'
Width = 173
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDeptDictPHONE: TcxDBTreeListColumn
Caption.Text = 'PHONE'
DataBinding.FieldName = 'PHONE'
Width = 174
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDeptDictFAX: TcxDBTreeListColumn
Caption.Text = 'FAX'
DataBinding.FieldName = 'FAX'
Width = 177
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDeptDictEMAIL: TcxDBTreeListColumn
Caption.Text = 'EMAIL'
DataBinding.FieldName = 'EMAIL'
Width = 173
Position.ColIndex = 4
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDeptDictVACANCY: TcxDBTreeListColumn
Caption.Text = 'VACANCY'
DataBinding.FieldName = 'VACANCY'
Width = 177
Position.ColIndex = 5
Position.RowIndex = 0
Position.BandIndex = 0
end
end
end
object tsPersons: TTabSheet
Caption = 'Persons'
ImageIndex = 1
object Label1: TLabel
Left = 0
Top = 0
Width = 488
Height = 48
Align = alTop
Caption =
'Multiselect and drag rows from the list below, then drop them on' +
'to the Departments hierarchy or the current department'#39's employe' +
'e list displayed by the main form'
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
WordWrap = True
end
object tlEmplDict: TcxDBTreeList
Left = 0
Top = 48
Width = 488
Height = 287
Styles.StyleSheet = DragDropDemoDataDM.TreeListStyleSheetDevExpress
Align = alClient
Bands = <
item
Caption.Text = 'Band + 1'
end>
BufferedPaint = False
DataController.DataSource = DragDropDemoDataDM.dsPersDict
DataController.ParentField = 'ID'
DataController.KeyField = 'ID'
DragMode = dmAutomatic
OptionsBehavior.ImmediateEditor = False
OptionsBehavior.AutomateLeftMostIndent = False
OptionsBehavior.IncSearchItem = tlDeptDictNAME
OptionsBehavior.DragDropText = True
OptionsBehavior.IncSearch = True
OptionsData.Inserting = True
OptionsSelection.MultiSelect = True
OptionsView.Indicator = True
OptionsView.ShowRoot = False
RootValue = 255
TabOrder = 0
OnDragOver = tlDictDragOver
OnMoveTo = tlDictMoveTo
object tlEmplDictName: TcxDBTreeListColumn
Caption.Text = 'Name'
DataBinding.FieldName = 'Name'
Width = 187
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
SortOrder = soAscending
end
object tlEmplDictCountry: TcxDBTreeListColumn
Caption.Text = 'Country'
DataBinding.FieldName = 'Country'
Width = 187
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictPostalCode: TcxDBTreeListColumn
Caption.Text = 'PostalCode'
DataBinding.FieldName = 'PostalCode'
Width = 187
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictCity: TcxDBTreeListColumn
Caption.Text = 'City'
DataBinding.FieldName = 'City'
Width = 187
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictAddress: TcxDBTreeListColumn
Caption.Text = 'Address'
DataBinding.FieldName = 'Address'
Width = 194
Position.ColIndex = 4
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictPhone: TcxDBTreeListColumn
Caption.Text = 'Phone'
DataBinding.FieldName = 'Phone'
Width = 187
Position.ColIndex = 5
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictFax: TcxDBTreeListColumn
Caption.Text = 'Fax'
DataBinding.FieldName = 'Fax'
Width = 187
Position.ColIndex = 6
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictEMAIL: TcxDBTreeListColumn
Caption.Text = 'EMAIL'
DataBinding.FieldName = 'EMAIL'
Width = 187
Position.ColIndex = 7
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictHOMEPAGE: TcxDBTreeListColumn
Caption.Text = 'HOMEPAGE'
DataBinding.FieldName = 'HOMEPAGE'
Width = 187
Position.ColIndex = 8
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmplDictDepartmentID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'DepartmentID'
DataBinding.FieldName = 'DepartmentID'
Position.ColIndex = 9
Position.RowIndex = 0
Position.BandIndex = 0
end
end
end
end
end

View File

@ -0,0 +1,66 @@
//---------------------------------------------------------------------------
#ifndef DragDropDemoDictionaryH
#define DragDropDemoDictionaryH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxCheckBox.hpp"
#include "cxControls.hpp"
#include "cxCurrencyEdit.hpp"
#include "cxCustomData.hpp"
#include "cxDBTL.hpp"
#include "cxGraphics.hpp"
#include "cxInplaceContainer.hpp"
#include "cxMaskEdit.hpp"
#include "cxStyles.hpp"
#include "cxTL.hpp"
#include "cxTLData.hpp"
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
class TDragDropDemoDictionaryForm : public TForm
{
__published: // IDE-managed Components
TPageControl *pcDictionary;
TTabSheet *tsDepartments;
TLabel *lsc;
TcxDBTreeList *tlDeptDict;
TcxDBTreeListColumn *tlDeptDictPARENTID;
TcxDBTreeListColumn *tlDeptDictNAME;
TcxDBTreeListColumn *tlDeptDictBUDGET;
TcxDBTreeListColumn *tlDeptDictPHONE;
TcxDBTreeListColumn *tlDeptDictFAX;
TcxDBTreeListColumn *tlDeptDictEMAIL;
TcxDBTreeListColumn *tlDeptDictVACANCY;
TTabSheet *tsPersons;
TLabel *Label1;
TcxDBTreeList *tlEmplDict;
TcxDBTreeListColumn *tlEmplDictName;
TcxDBTreeListColumn *tlEmplDictCountry;
TcxDBTreeListColumn *tlEmplDictPostalCode;
TcxDBTreeListColumn *tlEmplDictCity;
TcxDBTreeListColumn *tlEmplDictAddress;
TcxDBTreeListColumn *tlEmplDictPhone;
TcxDBTreeListColumn *tlEmplDictFax;
TcxDBTreeListColumn *tlEmplDictEMAIL;
TcxDBTreeListColumn *tlEmplDictHOMEPAGE;
TcxDBTreeListColumn *tlEmplDictDepartmentID;
void __fastcall tlDictDragOver(TObject *Sender, TObject *Source, int X, int Y,
TDragState State, bool &Accept);
void __fastcall tlDictMoveTo(TObject *Sender, TcxTreeListNode *AttachNode,
TcxTreeListNodeAttachMode AttachMode, TList *Nodes, bool &IsCopy, bool &Done);
public:
__fastcall TDragDropDemoDictionaryForm(TComponent* Owner);
void SetDeptSelectionParentValue(Variant AParentValue);
void SetEmplSelectionDeptID(Variant ADepartmentID);
};
void SetSelectedNodesValue(TcxDBTreeList *ATreeList, int AItemIndex,
Variant AValue);
//---------------------------------------------------------------------------
extern PACKAGE TDragDropDemoDictionaryForm *DragDropDemoDictionaryForm;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,202 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DragDropDemoMain.h"
#include "DragDropDemoData.h"
#include "DragDropDemoDictionary.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxClasses"
#pragma link "cxControls"
#pragma link "cxCustomData"
#pragma link "cxData"
#pragma link "cxDBData"
#pragma link "cxEdit"
#pragma link "cxFilter"
#pragma link "cxGraphics"
#pragma link "cxStyles"
#pragma link "cxLookAndFeels"
#pragma link "DemoBasicMain"
#pragma link "cxCheckBox"
#pragma link "cxCurrencyEdit"
#pragma link "cxDBTL"
#pragma link "cxInplaceContainer"
#pragma link "cxMaskEdit"
#pragma link "cxTL"
#pragma link "cxTLData"
#pragma resource "*.dfm"
TDragDropDemoMainForm *DragDropDemoMainForm;
//---------------------------------------------------------------------------
__fastcall TDragDropDemoMainForm::TDragDropDemoMainForm(TComponent* Owner)
: TDemoBasicMainForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::FormShow(TObject *Sender)
{
tlDepartments->FullExpand();
DragDropDemoDictionaryForm->Show();
/* remove/add the closing slash on this line to disable/enable the following code *
ShowMessage("WARNING: tutorial not completed. First, please apply the steps "
"shown in the doc file");
//*/
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::LookAndFeelChange(TObject *Sender)
{
if (((TMenuItem*)Sender)->Tag > 3){
cxLookAndFeelController->NativeStyle =
!cxLookAndFeelController->NativeStyle;
((TMenuItem*)Sender)->Checked = cxLookAndFeelController->NativeStyle;
}
else{
((TMenuItem*)Sender)->Checked = true;
cxLookAndFeelController->Kind = (TcxLookAndFeelKind)((TMenuItem*)Sender)->Tag;
cxLookAndFeelController->NativeStyle = false;
miNativeStyle->Checked = false;
}
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::miColumnCustomizationClick(TObject *Sender)
{
tlDepartments->Customizing->Visible = true;
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::miDragCollapseClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
tlDepartments->OptionsBehavior->DragCollapse = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::miDragExpandeClick(TObject *Sender)
{
((TMenuItem*)Sender)->Checked = !((TMenuItem*)Sender)->Checked;
tlDepartments->OptionsBehavior->DragExpand = ((TMenuItem*)Sender)->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::ShowDictionaries1Click(TObject *Sender)
{
DragDropDemoDictionaryForm->Show();
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::tlDepartmentsInitInsertingRecord(
TObject *Sender, TcxTreeListDataNode *AFocusedNode, bool &AHandled)
{
if (AFocusedNode != NULL)
DragDropDemoDataDM->SetParentValue(AFocusedNode->ParentValue);
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::tlDepartmentsDragDrop(TObject *Sender,
TObject *Source, int X, int Y)
{
/* remove/add the closing slash on this line to disable/enable the following code */
if (Sender == Source || !IsHitAtNode((TcxDBTreeList*)Sender, X, Y))
return;
TcxTreeListDataNode *AHitNode =
(TcxTreeListDataNode*)((TcxDBTreeList*)Sender)->HitTest->HitNode;
if (Source == DragDropDemoDictionaryForm->tlDeptDict){
if (IsDropAsChild((TcxDBTreeList*)Sender))
DragDropDemoDictionaryForm->SetDeptSelectionParentValue(AHitNode->KeyValue);
else
DragDropDemoDictionaryForm->SetDeptSelectionParentValue(AHitNode->ParentValue);
((TcxDBTreeList*)Sender)->DataController->DataSet->Refresh();
}
else{
if (Source == DragDropDemoDictionaryForm->tlEmplDict)
SetEmplDictSelectionDeptID(AHitNode->KeyValue);
else
SetSelectedNodesValue(tlEmployees, tlEmployeesDepartmentID->ItemIndex,
AHitNode->KeyValue);
}
//*/
}
bool TDragDropDemoMainForm::IsDropAsChild(TcxDBTreeList *Sender)
{
return !(Sender->HitTest->HitAtIndent || Sender->HitTest->HitAtIndicator);
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::tlDepartmentsDragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept)
{
/* remove/add the closing slash on this line to disable/enable the following code */
Accept = IsHitAtNode((TcxDBTreeList*)Sender, X, Y);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::tlEmployeesDragDrop(TObject *Sender,
TObject *Source, int X, int Y)
{
/* remove/add the closing slash on this line to disable/enable the following code */
if (Source == DragDropDemoDictionaryForm->tlEmplDict){
Variant AValue;
if (tlDepartments->FocusedNode != NULL)
AValue = ((TcxTreeListDataNode*)tlDepartments->FocusedNode)->KeyValue;
else
AValue = -1;
SetEmplDictSelectionDeptID(AValue);
}
//*/
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::tlEmployeesDragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept)
{
/* remove/add the closing slash on this line to disable/enable the following code */
Accept = (Source == DragDropDemoDictionaryForm->tlEmplDict);
//*/
}
//---------------------------------------------------------------------------
void __fastcall TDragDropDemoMainForm::tlEmployeesMoveTo(TObject *Sender,
TcxTreeListNode *AttachNode, TcxTreeListNodeAttachMode AttachMode,
TList Nodes, bool &IsCopy, bool &Done)
{
/* remove/add the closing slash on this line to disable/enable the following code */
Done = true;
//*/
}
//---------------------------------------------------------------------------
bool TDragDropDemoMainForm::IsHitAtNode(TcxDBTreeList *ATreeList, int X, int Y)
{
ATreeList->HitTest->ReCalculate(Point(X,Y));
return ATreeList->HitTest->HitAtNode;
}
//---------------------------------------------------------------------------
void TDragDropDemoMainForm::SetEmplDictSelectionDeptID(Variant AValue)
{
DragDropDemoDictionaryForm->SetEmplSelectionDeptID(AValue);
tlEmployees->DataController->DataSet->Close();
tlEmployees->DataController->DataSet->Open();
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,417 @@
inherited DragDropDemoMainForm: TDragDropDemoMainForm
Left = 188
Top = 42
Width = 758
Height = 548
Caption = 'ExpressQuantumTreeList4 DragDropDemo'
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
inherited lscrip: TLabel
Width = 750
Caption =
'This demo demonstrates how to populate the TreeList control from' +
' another one and change its hierarchy using drag/drop. See Help/' +
'About for more information'
end
object Splitter1: TSplitter [1]
Left = 361
Top = 32
Width = 8
Height = 443
Color = 15981511
ParentColor = False
end
inherited sbMain: TStatusBar
Top = 475
Width = 750
end
inherited memAboutText: TMemo
Lines.Strings = (
'In this demo you can:'
''
'- assign persons to a department as employees '
'This can be done in three different ways:'
' (a) multiselect any rows of the Person list from the Dictionar' +
'ies form and drop them onto the list of persons displayed to the' +
' left of the main form'
' (b) multiselect any rows of the Person list from the Dictionar' +
'ies form and drop them onto any department within the Department' +
's hierarchy, displayed to the right of the main form'
' (c) multiselect any rows of the employee list displayed to the' +
' left of the main form and drop them onto another department wit' +
'hin the Departments hierarchy'
''
'- change the Departments hierarchy'
'This can be done in two different ways:'
' (a) multiselect any rows of the department list from the Dicti' +
'onaries form and drop them onto any department within the Depart' +
'ments hierarchy'
' (b) select any department within the Departments hierarchy and' +
' drop it onto another department'
''
'- insert/delete departments using the Ins/Ctrl+Delete keys'
''
'NOTE: if you haven'#39't done so already, you might like to practice' +
' by completing the tutorial version of this demo (see the tutori' +
'als folder).')
end
object pnlDepartments: TPanel [4]
Left = 0
Top = 32
Width = 361
Height = 443
Align = alLeft
BevelOuter = bvNone
Caption = 'pnlDepartments'
TabOrder = 2
object tlDepartments: TcxDBTreeList
Left = 0
Top = 28
Width = 361
Height = 415
Styles.StyleSheet = DragDropDemoDataDM.TreeListStyleSheetDevExpress
Align = alClient
Bands = <
item
Caption.Text = 'Band + 1'
Width = 600
end>
BufferedPaint = False
DataController.DataSource = DragDropDemoDataDM.dsDepartments
DataController.ParentField = 'PARENTID'
DataController.KeyField = 'ID'
DragMode = dmAutomatic
OptionsBehavior.ImmediateEditor = False
OptionsBehavior.AutomateLeftMostIndent = False
OptionsBehavior.DragFocusing = True
OptionsBehavior.DragDropText = True
OptionsData.Inserting = True
OptionsView.GridLineColor = 14916958
OptionsView.GridLines = tlglBoth
OptionsView.Indicator = True
Preview.Column = tlDepartmentsNAME
Preview.Place = tlppTop
Preview.Visible = True
RootValue = 255
TabOrder = 0
OnDragDrop = tlDepartmentsDragDrop
OnDragOver = tlDepartmentsDragOver
OnInitInsertingRecord = tlDepartmentsInitInsertingRecord
object tlDepartmentsID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'ID'
DataBinding.FieldName = 'ID'
Position.ColIndex = 6
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDepartmentsPARENTID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'PARENTID'
DataBinding.FieldName = 'PARENTID'
Position.ColIndex = 7
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDepartmentsNAME: TcxDBTreeListColumn
Caption.Text = 'NAME'
DataBinding.FieldName = 'NAME'
Width = 183
Position.ColIndex = 5
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDepartmentsBUDGET: TcxDBTreeListColumn
Caption.Text = 'BUDGET'
DataBinding.FieldName = 'BUDGET'
Width = 193
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDepartmentsPHONE: TcxDBTreeListColumn
Caption.Text = 'PHONE'
DataBinding.FieldName = 'PHONE'
Width = 192
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDepartmentsFAX: TcxDBTreeListColumn
Caption.Text = 'FAX'
DataBinding.FieldName = 'FAX'
Width = 193
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDepartmentsEMAIL: TcxDBTreeListColumn
Caption.Text = 'EMAIL'
DataBinding.FieldName = 'EMAIL'
Width = 192
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlDepartmentsVACANCY: TcxDBTreeListColumn
Caption.Text = 'VACANCY'
DataBinding.FieldName = 'VACANCY'
Width = 193
Position.ColIndex = 4
Position.RowIndex = 0
Position.BandIndex = 0
end
end
object pnlDeptCaption: TPanel
Left = 0
Top = 0
Width = 361
Height = 28
Align = alTop
BevelOuter = bvNone
Caption = 'Departments'
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -24
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
TabOrder = 1
end
end
object pnlEmployees: TPanel [5]
Left = 369
Top = 32
Width = 381
Height = 443
Align = alClient
BevelOuter = bvNone
Caption = 'pnlEmployees'
TabOrder = 3
object pnlEmplCaption: TPanel
Left = 0
Top = 0
Width = 381
Height = 28
Align = alTop
BevelOuter = bvNone
Caption = 'Employees'
Color = 12937777
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -24
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
TabOrder = 0
end
object tlEmployees: TcxDBTreeList
Left = 0
Top = 28
Width = 381
Height = 415
Styles.StyleSheet = DragDropDemoDataDM.TreeListStyleSheetDevExpress
Align = alClient
Bands = <
item
Caption.Text = 'Band + 1'
end>
BufferedPaint = False
DataController.DataSource = DragDropDemoDataDM.dsPersons
DataController.ParentField = 'ID'
DataController.KeyField = 'ID'
DragMode = dmAutomatic
OptionsBehavior.ImmediateEditor = False
OptionsBehavior.AutomateLeftMostIndent = False
OptionsBehavior.DragFocusing = True
OptionsBehavior.DragDropText = True
OptionsSelection.MultiSelect = True
OptionsView.Buttons = False
OptionsView.Indicator = True
OptionsView.ShowRoot = False
RootValue = 255
TabOrder = 1
OnDragDrop = tlEmployeesDragDrop
OnDragOver = tlEmployeesDragOver
OnMoveTo = tlEmployeesMoveTo
object tlEmployeesName: TcxDBTreeListColumn
Caption.Text = 'Name'
DataBinding.FieldName = 'Name'
Width = 166
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
SortOrder = soAscending
end
object tlEmployeesCountry: TcxDBTreeListColumn
Caption.Text = 'Country'
DataBinding.FieldName = 'Country'
Width = 166
Position.ColIndex = 1
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesPostalCode: TcxDBTreeListColumn
Caption.Text = 'PostalCode'
DataBinding.FieldName = 'PostalCode'
Width = 166
Position.ColIndex = 2
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesCity: TcxDBTreeListColumn
Caption.Text = 'City'
DataBinding.FieldName = 'City'
Width = 166
Position.ColIndex = 3
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesAddress: TcxDBTreeListColumn
Caption.Text = 'Address'
DataBinding.FieldName = 'Address'
Width = 172
Position.ColIndex = 4
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesPhone: TcxDBTreeListColumn
Caption.Text = 'Phone'
DataBinding.FieldName = 'Phone'
Width = 166
Position.ColIndex = 5
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesFax: TcxDBTreeListColumn
Caption.Text = 'Fax'
DataBinding.FieldName = 'Fax'
Width = 166
Position.ColIndex = 6
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesEMAIL: TcxDBTreeListColumn
Caption.Text = 'EMAIL'
DataBinding.FieldName = 'EMAIL'
Width = 166
Position.ColIndex = 7
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesHOMEPAGE: TcxDBTreeListColumn
Caption.Text = 'HOMEPAGE'
DataBinding.FieldName = 'HOMEPAGE'
Width = 166
Position.ColIndex = 8
Position.RowIndex = 0
Position.BandIndex = 0
end
object tlEmployeesDepartmentID: TcxDBTreeListColumn
Visible = False
Caption.Text = 'DepartmentID'
DataBinding.FieldName = 'DepartmentID'
Position.ColIndex = 9
Position.RowIndex = 0
Position.BandIndex = 0
end
end
end
inherited mmMain: TMainMenu
inherited miOptions: TMenuItem
object ShowDictionaries1: TMenuItem [0]
Caption = 'Show &Dictionaries'
Hint = 'Shows the Dictionaries form'
OnClick = ShowDictionaries1Click
end
object N2: TMenuItem [1]
Caption = '-'
end
object miDragExpande: TMenuItem [2]
Caption = 'Drag &Expande'
Checked = True
Hint =
'If checked, a collapsed node is expanded when a user drags a nod' +
'e to it'
OnClick = miDragExpandeClick
end
object miDragCollapse: TMenuItem [3]
Caption = 'Drag &Collapse'
Checked = True
Hint =
'If checked, an expanded node is collapsed when a user drags a no' +
'de to it '
OnClick = miDragCollapseClick
end
object N1: TMenuItem [4]
Caption = '-'
end
object miColumnCustomization: TMenuItem [5]
Caption = 'Column &Customization ...'
Hint = 'Shows the column customization form'
OnClick = miColumnCustomizationClick
end
object miSeparator1: TMenuItem [6]
Caption = '-'
end
object miGridLookFeel: TMenuItem [7]
Caption = '&Look&&Feel'
object miKind: TMenuItem
Caption = '&Kind'
object miFlat: TMenuItem
Caption = '&Flat'
GroupIndex = 1
Hint = 'Setting this option changes the demo appearance to Flat style'
RadioItem = True
OnClick = LookAndFeelChange
end
object miStandard: TMenuItem
Tag = 1
Caption = '&Standard'
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Standard styl' +
'e'
RadioItem = True
OnClick = LookAndFeelChange
end
object miUltraFlat: TMenuItem
Tag = 2
Caption = '&Ultra Flat'
Checked = True
GroupIndex = 1
Hint =
'Setting this option changes the demo appearance to Ultra Flat st' +
'yle'
RadioItem = True
OnClick = LookAndFeelChange
end
object Office111: TMenuItem
Tag = 3
Caption = 'Office 11'
GroupIndex = 1
RadioItem = True
OnClick = LookAndFeelChange
end
end
object miNativeStyle: TMenuItem
Tag = 4
Caption = '&Native Style'
Hint = 'Setting this option changes the demo appearance to Native style'
OnClick = LookAndFeelChange
end
end
object miSeparator2: TMenuItem [8]
Caption = '-'
end
end
end
end

Some files were not shown because too many files have changed in this diff Show More