express cross platform library
TRANSCRIPT
Known Issues and Important Changes List All entries in the following list are grouped by Builds, in reverse order. VCL 15.1.1 1. Breaking Change – Improvements to our export engine introduced a number of changes to the cxExport unit, which are reflected below. Several types and global functions have been removed. To avoid compilation errors in your code, use the following equivalents:
The following redundant members have been removed:
l The TcxCacheItem record; l The TcxExportStyleManager and TFileStreamEx classes; l The cxDataTypeAnsiString, cxDataTypeWideString, cxDataTypeDouble, cxDataTypeInteger, cxDataTypeGraphic,
cxDataTypeString, and cxCheckForDuplicateImages global constants. Checks for image duplicates previously controlled by the cxCheckForDuplicateImages global constant are now always performed (as if the constant is set to True) to avoid creating duplicate image files, ensuring you have the optimal (compact) output file size;
l The cxFileStreamClass, cxGetResString, and cxUnicodeSupported global variables; l The cxUnicodeToStr, cxStrToUnicode, cxValidateFileNameW, cxValidateStr, cxSetCellNativeValue, GetGraphicAsText,
GetTextAsGraphicStream, cxExportInit, and UseGraphicImages global methods.
The IcxExportProvider interface and TcxCacheCellStyle packed record have been modified to comply with the new API. 2. Breaking Change – In order to add support for our universal image format to gallery items we changed the Glyph property type in TdxCustomGalleryItem to TdxSmartGlyph (a TdxSmartImage descendant). Now, to assign an image to this property, you need to call its Assign method rather than use the assignment operator :=. In addition to the TdxCustomGalleryItem class, this change affects all its descendants, including: TdxGalleryItem, TdxGalleryControlItem, TdxRibbonGalleryGroupItem, TdxSkinChooserGalleryGroupItem, and TdxRibbonBackstageViewGalleryItem. 3. Breaking Change – dxCore and dxXMLDoc unit members specific to non-Unicode IDEs that are no longer supported (Borland Delphi 7, CodeGear Delphi 2007, and CodeGear C++Builder 2007) have been removed. To avoid compilation errors in your code, use the following equivalents:
Type Equivalent
TcxFontStyle Graphics.TFontStyle
TcxFontStyles Graphics.TFontStyles
Function Equivalent
cxChangeFileExtExW SysUtils.ChangeFileExt
cxExtractFileNameEx and cxExtractFileNameExW
SysUtils.ExtractFileName
cxExtractFilePathExW SysUtils.ExtractFilePath
cxColorToRGB System.UITypes.TColors.ColorToRGB
GetHashCode System.Generics.Defaults.BobJenkinsHash
Type Equivalent
Page 1 of 938
VCL 14.2.2 Breaking Change – The cxGetResourceString, cxSetResourceString, and cxClearResourceStrings global methods have been moved from the cxClasses unit to the dxCore unit. VCL 14.1.1 1. Breaking Change – The following TdxGPCanvas class methods declared in the dxGDIPlusClasses unit have been extended with overloaded versions that accept the TdxAlphaColor parameters instead of the TColor and Byte parameter pairs. procedure Arc(R: TRect; AStartAngle, ASweepAngle: Single; APenColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255); procedure Ellipse(R: TRect; APenColor, ABrushColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255; ABrushColorAlpha: Byte = 255); procedure Line(X1, Y1, X2, Y2: Integer; APenColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255); procedure Pie(R: TRect; AStartAngle, ASweepAngle: Single; APenColor: TColor; ABrushColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255; ABrushColorAlpha: Byte = 255); procedure Polygon(const APoints: array of TPoint; APenColor: TColor; ABrushColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255; ABrushColorAlpha: Byte = 255); overload; procedure Polygon(const APoints: array of TdxPointF; APenColor: TColor; ABrushColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255; ABrushColorAlpha: Byte = 255); overload; procedure Polyline(const APoints: array of TPoint; APenColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255); procedure Rectangle(R: TRect; APenColor, ABrushColor: TColor; APenWidth: Single = 1; APenStyle: TPenStyle = psSolid; APenColorAlpha: Byte = 255; ABrushColorAlpha: Byte = 255); procedure RoundRect(const R: TRect; APenColor, ABrushColor: TColor; ARadiusX, ARadiusY: Integer; APenWidth: Integer = 1; APenColorAlpha: Byte = 255; ABrushColorAlpha: Byte = 255);
In addition, we removed default parameter values from the overloaded variants listed above to avoid compilation problems in Delphi 7, and replicated the same parameter values in the TdxAlphaColor-based overloaded variants. If your legacy code called these methods with the default parameter values, you must either manually specify the previous parameter values or switch to TdxAlphaColor-based overloaded methods and call the dxColorToAlphaColor function declared in the dxCoreGraphics unit to convert TColor values to TdxAlphaColor equivalents. Example: The Rectangle(R, APenColor, ABrushColor) line will now look as follows: Rectangle(R, dxColorToAlphaColor(APenColor), dxColorToAlphaColor(ABrushColor)). 2. Breaking Change – In the dxGPDrawText global method declared in the dxGDIPlusClasses unit, the ATextColor and AAlpha
TdxUnicodeString string
TdxUnicodeChar System.Char
PdxUnicodeChar System.PChar
Member Equivalent
dxStringToWideString, dxWideStringToString, dxStringToUnicodeString, and dxUnicodeStringToString
The assignment operator :=
TdxXMLNode.TextAsUnicodeString TdxXMLNode.TextAsString
TdxXMLNodeAttributes.GetValueAsUnicodeString TdxXMLNodeAttributes.GetValueAsString
TdxXMLNodeAttributes.SetValueAsUnicodeString TdxXMLNodeAttributes.SetValueAsString
Page 2 of 938
parameters (which accepted a TColor and Integer value pair) have been replaced with the ATextColor parameter, which now accepts a TdxAlphaColor value. To avoid compilation errors, call the dxColorToAlphaColor function declared in the dxCoreGraphics unit to convert previous parameter values to a TdxAlphaColor equivalent. VCL 13.2.4 Breaking Change – To improve TcxCanvas.Rectangle compatibility with the standard VCL TCanvas.Rectangle method, the default value of the ABorders parameter of the following TcxCanvas.Rectangle overloaded method has been changed from [] to cxBordersAll: procedure TcxCanvas.Rectangle(R: TRect; const AParams: TcxViewParams; const ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; AExcludeRect: Boolean = False)
To avoid painting borders in your legacy code that omitted specifying the ABorders parameter value, and as a result, used the default parameter value, pass [] as this parameter. VCL 13.2.1 1. Breaking Change – Several types and global functions have been removed from the dxGDIPlusAPI unit. To avoid compilation errors in your code, use the following equivalents declared in the dxCoreGraphics unit:
2. Breaking Change – The TRGBColors type and the dxColorToRGBQuad, dxRGBQuadToColor, cxGetBitmapPixelFormat, dxFillBitmapInfoHeader, GetBitmapBits, GetBitmapBitsByScanLine, SetBitmapBits, and dxIsAlphaUsed global methods have been moved from the dxCore unit to the dxCoreGraphics unit. 3. Breaking Change – The GetRealColor global function in the cxGraphics unit has been renamed dxGetNearestColor. 4. Breaking Change – The dxOffice11 unit now installs with ExpressLibrary. Several global functions have been removed from this unit. To avoid compilation errors in your code, use the following equivalents declared in the cxGraphics unit:
The IsHighContrastBlack, IsHighContrastWhite, IsHighContrast2, FillGradientRect, FillRectByColor, FrameRectByColor, and GetGradientColorRect global methods have been moved from the dxOffice11 unit to the cxGraphics unit. In addition, the FillTubeGradientRect procedure has been renamed Office11FillTubeGradientRect.
Type dxCoreGraphics Equivalent
PARGB PdxAlphaColor
ARGB TdxAlphaColor
Method dxCoreGraphics Equivalent
dxGpARGBToColor dxAlphaColorToColor
dxGpColorToARGB dxColorToAlphaColor
dxGpMakeARGBColor dxMakeAlphaColor
Function cxGraphics Equivalent
Dark dxGetDarkerColor
GetLightColor GetLightColor
GetMiddleRGB dxGetMiddleRGB
GetRealColor dxGetNearestColor
Light dxGetLighterColor
Page 3 of 938
5. Breaking Change – The TcxControl class has been extended with the Hint property to unify the manner in which hints are displayed in status bar panels supporting the AutoHint capability. To enable your legacy code to use this new property rather than the previously used TControl.Hint, cast your object (TcxControl or its descendant) to TcxControl. 6. Breaking Change – The following TcxCanvas.FillRect overloaded method’s declaration procedure TcxCanvas.FillRect(R: TRect; const AParams: TcxViewParams; ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; AExcludeRect: Boolean = False)
has been replaced with: procedure TcxCanvas.FillRect(const R: TRect; const AParams: TcxViewParams; AExcludeRect: Boolean = False). To avoid compilation errors in your code, replace calls to the previous TcxCanvas.FillRect version with code equivalents that use the following TcxCanvas.Rectangle overloaded method: procedure TcxCanvas.Rectangle(R: TRect; const AParams: TcxViewParams; const ABorders: TcxBorders = []; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; AExcludeRect: Boolean = False). VCL 13.1.4 Breaking Change – The dxHalfOfPi constant declaration has been moved from the cxGeometry unit to the implementation section of the cxGridLayoutViewCarouselMode unit, in order to avoid compilation warnings in C++Builder. VCL 13.1.3 Since building an application with a trial version requires runtime packages of our VCL controls, we've added a corresponding warning message to let you know about this requirement and assist you with enabling the corresponding project option in the IDE. This warning message is shown only if a form with our VCL controls is currently open in the IDE. The warning message aborts compilation, prompting you to either change the project option or turn off the warning message in the future. In RAD Studio 2010 or later, the warning message is shown only if the required option is disabled in your project settings. You can enable it right from the message dialog. Note that in RAD Studio XE2 or later, the option is called "Link with runtime packages". In previous versions, it is called "Build with runtime packages".
In RAD Studio 2007 or Delphi 7, project settings in effect cannot be accessed at design time, so the warning message is shown regardless of the "Build with runtime packages" option setting. You need to manually enable this option in project settings and then turn off the warning message using the message dialog's option the next time it appears during compilation. Once turned off, the warning message won’t reappear in the future when compiling projects with the trial version you installed.
Page 4 of 938
VCL 13.1.1 1. Breaking Change – In order to assist with the evolution of your applications and thus make them Touch-enabled, we have changed the default vertical alignment setting for the following UI elements:
l Standalone text editors with a single-line input field (such as cxTextEdit, cxComboBox, etc.); l Captions in ExpressQuantumGrid column/band headers; l Captions in ExpressVerticalGrid editor row headers and category rows; l Captions and glyphs in ExpressQuantumTreeList column/band headers.
Now these UI elements are vertically centered by default. For backward compatibility, define the USETOPVERTICALALIGNMENTASDEFAULT conditional symbol and rebuild your application. 2. Breaking Change – The following members have been moved from the dxCalendarUtils unit to the cxDateUtils unit:
l The TcxEra, TcxEras, TcxCustomCalendarTable, and TcxCustomCalendarTableClass classes; l The TcxCALID, TcxCalendarAlgorithmType, TcxDateEditSmartInput, TcxDateTime, TcxDate, and TcxTime types; l The cxGetCalendarInfo, cxDateTimeToText, cxDateToLocalFormatStr, cxDateToStr, cxDayNumberToLocalFormatStr,
cxGetCalendar, cxGetLocalCalendarID, cxGetLocalCalendar, cxGetLocalDateSeparator, cxGetLocalFormatSettings, cxGetLocalLongDateFormat, cxGetLocalMonthName, cxGetLocalMonthYear, cxGetLocalShortDateFormat, cxGetLocalTimeAMString, cxGetLocalTimePMString, cxGetLocalTimeSeparator, cxGetLocalYear, cxGetDayOfWeekName, cxLocalFormatStrToDate, cxStrToDate, cxTimeToStr, cxGetDateFormat, cxStrToDateTime, cxTextToDateTime, DateToLongDateStr, DateTimeToText, DateTimeToTextEx, dxGetCalendarDateElement, StrToDateDef, SmartTextToDate, and TextToDateEx functions;
l The AddDateRegExprMaskSmartInput procedure; l The cxUseSingleCharWeekNames and scxDateEditSmartInput variables; l The DATE_YEARMONTH, DATE_LTRREADING, DATE_RTLREADING, and SmartTextToDateFunc constants.
VCL 12.2.1 Breaking Change – Now HScrollBar and VScrollBar are IcxControlScrollBar interface type properties. You can specify the scrollbar class to be used in a TcxControl descendant by overriding the GetMainScrollBarsClass function. The TcxControl class returns TcxControlWindowedScrollBars as the function result to use windowed scrollbars (TcxControlScrollBar objects). Override this function to return TcxControlScrollBars in order to use non-windowed scrollbars (TcxControlScrollBarHelper objects). For windowed scrollbars, you must now access TWinControl properties via the IcxControlScrollBar.Control interface property to avoid compilation errors. For instance, to obtain the Handle of a horizontal scrollbar, use HScrollBar.Control.Handle instead of HScrollBar.Handle. For non-windowed scrollbars, the IcxControlScrollBar.Control interface property returns nil. VCL 12.1.1 1. Breaking Change – Starting from this Build, the installer includes only shared packages and no longer provides personality-specific packages for IDEs. The installer removes the personality-specific installations for IDEs during the update. You need to select the appropriate RAD Studio versions at the selection step in Setup and install the shared packages instead. 2. Breaking Change – Since the installer now includes only shared packages, the out method and event parameters that reference object types have been replaced with the var parameters to ensure proper header file generation in C++Builder. As a result, saving changes in existing Delphi projects may result in errors regarding incorrect method or event handler parameters. When prompted by the IDE, do not remove incorrect instances but manually replace "out" with "var" in method/event handler definitions and implementations, and then save the changes. 3. Breaking Change – The CanShowHint global function has been renamed dxCanShowHint in the cxContainer unit. The following helper interfaces, classes, and functions related to hints have been moved from the cxControls unit to the dxCustomHint unit: IcxHintWindowHelper, IcxHintableObject, TcxHintAnimationStyle, TcxBaseHintWindow, TcxControlHintHelper, cxActivateHint, cxActivateHintData, and cxProcessControlHintInfo. 4. Breaking Change – We made a number of changes to date processing classes, types, functions, and constants.
Page 5 of 938
The cxDateUtils unit:
l The TDayOfWeek and TcxDayOfWeek types have been renamed TdxDayOfWeek. l The GetStartDateOfWeek function has been removed. Use the dxGetStartDateOfWeek function instead.
The following table lists renamed functions in this unit and their new names.
The following functions and constants have been moved from the cxDateUtils unit to the dxCalendarUtils unit:
l function cxGetCalendarInfo(Locale: LCID; Calendar: CALID; CalendType: CALTYPE; lpCalData: PChar; cchData: Integer; lpValue: PDWORD): Integer;
l function cxDateToLocalFormatStr(ADate: TDateTime): string; l function cxDateToStr(ADate: TDateTime): string; overload; l function cxDateToStr(ADate: TDateTime; AFormat: TFormatSettings): string; overload; l function cxDayNumberToLocalFormatStr(ADate: TDateTime): string; overload; l function cxDayNumberToLocalFormatStr(ADay: Integer; ACalendar: TcxCustomCalendarTable = nil): string; overload; l function cxGetCalendar(ACalendType: CALTYPE): TcxCustomCalendarTable; l function cxGetCalendarClass(ACalendType: CALTYPE): TcxCustomCalendarTableClass; l function cxGetLocalCalendarID: TcxCALID; l function cxGetLocalCalendar: TcxCustomCalendarTable; l function cxGetLocalDateSeparator: Char; l function cxGetLocalFormatSettings: TFormatSettings; l function cxGetLocalLongDateFormat: string; l function cxGetLocalLongTimeFormat: string; l function cxGetLocalMonthName(ADate: TDateTime; ACalendar: TcxCustomCalendarTable): string; overload; l function cxGetLocalMonthName(AYear, AMonth: Integer; ACalendar: TcxCustomCalendarTable): string; overload; l function cxGetLocalMonthYear(ADate: TDateTime; ACalendar: TcxCustomCalendarTable = nil): string; l function cxGetLocalShortDateFormat: string; l function cxGetLocalTimeAMString: string; l function cxGetLocalTimePMString: string; l function cxGetLocalTimeSeparator: Char; l function cxGetLocalYear(ADate: TDateTime; ACalendar: TcxCustomCalendarTable = nil): string; l function cxGetDayOfWeekName(ADay: TDay; AFontCharset: TFontCharset): string; l function cxIsGregorianCalendar(ACalendar: TcxCustomCalendarTable = nil): Boolean; l function cxLocalFormatStrToDate(const ADateStr: string): TDateTime; l function cxStrToDate(const ADateStr: string; ACalendar: TcxCustomCalendarTable = nil): TcxDateTime; overload; l function cxStrToDate(const ADateStr: string; AFormat: TFormatSettings; ACalendar: TcxCustomCalendarTable = nil):
TcxDateTime; overload; l function cxStrToDate(const ADateString: string; const AFormat: TFormatSettings; ACALTYPE: CALTYPE): TDate;
Function New Name
DayOfWeekOffset dxDayOfWeekOffset
GetStartDateOfYear dxGetStartDateOfYear
GetEndDateOfYear dxGetEndDateOfYear
GetMonthNumber dxGetMonthNumber
GetStartDateOfMonth dxGetStartDateOfMonth
GetEndDateOfMonth dxGetEndDateOfMonth
GetWeekNumber dxGetWeekNumber
GetDateElement dxGetDateElement Alternatively, you can use dxCalendarUtils.dxGetCalendarDateElement
Page 6 of 938
l
overload; l function cxTimeToStr(ATime: TDateTime): string; overload; l function cxTimeToStr(ATime: TDateTime; ATimeFormat: string): string; overload; l function cxTimeToStr(ATime: TDateTime; AFormatSettings: TFormatSettings): string; overload; l procedure AddDateRegExprMaskSmartInput(var AMask: string; ACanEnterTime: Boolean); l function cxGetDateFormat(ADate: TDateTime; out AFormatDate: string; AFlags: Integer; AFormat: string = ''): Boolean; l function DateToLongDateStr(ADate: TDateTime): string; l function cxDateTimeToText(ADate: TDateTime; AFourDigitYearNeeded: Boolean = False; AUseDelphiDateTimeFormats:
Boolean = False): string; l function cxTextToDateTime(const AText: string; AUseDelphiDateTimeFormats: Boolean = False): TDateTime; l function DateTimeToText(ADate: TDateTime; AFourDigitYearNeeded: Boolean = False): string; l function DateTimeToTextEx(const ADate: TDateTime; AIsMasked: Boolean; AIsDateTimeEdit: Boolean = False;
AFourDigitYearNeeded: Boolean = False): string; l function TextToDateEx(AText: string; var ADate: TDateTime; const AFormatString: string = ''): Boolean; l function StrToDateDef(const ADateStr: string; ADefDate: TDateTime): TDateTime; l function SmartTextToDate(const AText: string; var ADate: TDateTime): Boolean; l const SmartTextToDateFunc: function(const AText: string; var ADate: TDateTime): Boolean = nil; l function cxStrToDateTime(S: string; AUseOleDateFormat: Boolean; out ADate: TDateTime): Boolean;
The cxFormats unit:
l The TcxFormatController.StartOfWeek property now returns a TDay value. A TcxFormatController object is returned by the cxFormatController global function.
The dxCore unit:
l The TdxFormatSettings class has been moved to the cxFormats unit. l The dxGetStartOfWeek: WORD function has been replaced with the cxDateUtils.dxGetStartOfWeek: TDay function.
The cxClasses unit:
l The dxEndOfLine constant has been deleted. Use the dxCore.dxCRLF constant instead.
Build v2011 vol 2.5 Breaking Change – The awbkMenu value of the TdxAlertWindowButtonKind type has been renamed awbkDropdown. Build v2011 vol 2.4 1. Breaking Change – Procedure cxContainer.AssignFonts has been removed. Use the TFont.Assign method instead. 2. Breaking Change – Function cxContainer.InternalGetCursorPos has been removed. Use the cxControls.GetMouseCursorPos function instead. 3. Breaking Change – Function cxContainer.InternalGetShiftState has been removed. Use the Forms.KeyboardStateToShiftState function instead. 4. Breaking Change – Type cxContainer.TcxNativeHandle has been removed. Use the THandle type instead. Build v2011 vol 1.7 Setting the TcxLocalizer.Active property to True now automatically reads localized strings compiled to a DLL file, as if the TcxLocalizer.LoadFromResource method was called.
Page 7 of 938
Build v2011 vol 1.2 1. Breaking Change – Function dxUnitsLoader has been moved from unit dxGDIPlusAPI to the dxCore unit. In applications with custom skins, specify the dxCore unit in the ‘uses’ clause. 2. Breaking Change – The dxInitializeGDIPlus and dxFinalizeGDIPlus procedures have been moved from the dxGDIPlusAPI unit to the dxCore unit, and renamed to dxInitialize and dxFinalize. In applications with custom skins, specify the dxCore unit in the ‘uses’ clause. Build v2011 vol 1.1 1. Breaking Change – Function cxContainerGetBorderWidthByPainter has been removed from the cxContainer unit. Use the painter’s GetContainerBorderWidth method instead. 2. Breaking Change – Function cxEditGetBorderWidthBySkinPainter has been removed from the cxEditUtils unit. Use the painter’s GetContainerBorderWidth method instead. 3. Breaking Change – The TcxTimer class has been moved from the cxControls unit to the cxClasses unit. 4. Breaking Change – The cxLookAndFeelPainters.GetExtendedStylePainters function has been removed. Use the cxLookAndFeels.RootLookAndFeel function instead, as shown in the following example: //Delphi
//...
uses //...
cxLookAndFeels, dxSkinInfo; //...
var
ASkinInfo: TdxSkinInfo; begin // the painter's GetPainterData method returns True for skins, False – for traditional styles
if RootLookAndFeel.Painter.GetPainterData(ASkinInfo) then Caption := ASkinInfo.Skin.DisplayName; end;
Build 54 1. Breaking Change – Functions dxGpDrawImage, dxGpFillRect, dxGpFillRectByGradient, dxGpIsRectVisible, dxGpTilePart, dxGpTilePartEx, dxGpRoundRect, dxGpRoundRectEx have been moved from the dxGDIPlusApi unit to the dxGDIPlusClasses unit. 2. Breaking Change – The HexToByte function has been moved from the cxClasses unit to the dxCore unit. 3. Breaking Change – The cxContainerMaxBorderWidth constant and the TcxContainerBorderStyle type have been moved from the cxContainer unit to the cxLookAndFeelPainters unit. 4. Breaking Change – Unit cxControls – Function DragDetect has been renamed to cxDragDetect. Its parameter list has been changed. 5. Breaking Change:
l The WM_DX message has been moved from the cxClasses unit to the dxMessages unit. l The CM_CLOSEPOPUPWINDOW message has been removed from the cxContainer unit. Use the
dxMessages.DXM_CLOSEPOPUPWINDOW message instead. l The CM_SHOWPOPUPWINDOW message has been removed from the cxContainer unit. Use the
dxMessages.DXM_SHOWPOPUPWINDOW message instead.
Page 8 of 938
l The CM_SHORTREFRESHCONTAINER message has been removed from the cxContainer unit. Use the
dxMessages.DXM_SHORTREFRESHCONTAINER message instead. l The CM_UPDATESCROLLBARS message has been removed from the cxContainer unit. Use the
dxMessages.DXM_UPDATESCROLLBARS message instead. l The CM_BUFFEREDPAINTONGLASS message has been removed from the cxContainer unit. Use the
dxMessages.DXM_BUFFEREDPAINTONGLASS message instead. l The CM_NCSIZECHANGED message has been removed from the cxControls unit. Use the
dxMessages.DXM_NCSIZECHANGED message instead. l The WM_SYNCHRONIZETHREADS message has been removed from the cxControls unit. Use the
dxMessages.DXM_SYNCHRONIZETHREADS message instead. l The DXM_CONTAINERSETFOCUS message has been removed from the cxControls unit. Use the
dxMessages.DXM_CONTAINERSETFOCUS message instead.
Build 52 1. Breaking Change – The TdxRGBColors array has been removed from the dxGDIPlusClasses unit. Use the dxCore.TRGBColors array instead. 2. Breaking Change – Function GetBitmapBits has been moved from the cxGraphics to the dxCore unit. Its parameter list and return type have been changed. 3. Breaking Change – Routine SetBitmapBits has been moved from the cxGraphics to the dxCore unit. Build 50 Breaking Change – The GetStartOfWeek function has been removed from the cxDateUtils unit. Use the dxGetStartOfWeek function from the dxCore unit instead. Build 45 1. Breaking Change – The AEnabled Boolean parameter has been added into the TcxCustomLookAndFeelPainter.GroupBoxTextColor class function. Pass True to this parameter to indicate that the TcxGroupBox control is enabled. 2. Breaking Change – The AHasTextArea Boolean variable parameter has been added into the TcxCustomLookAndFeelPainter.SchedulerNavigationButtonSizes class method. To retain the SchedulerNavigationButtonSizes functionality as in previous Builds, pass True to this parameter. Build 44 1. Breaking Change – In the dxCore unit, the cxBinToHex and cxHexToBin functions have been renamed dxBinToHex and dxHexToBin, respectively. 2. Breaking Change – In the cxGraphics unit, the TcxCustomBitmap and TcxBitmap classes have been renamed TcxBitmap and TcxBitmap32, respectively. Build 43 1. Breaking Change – The cxColorToRGBQuad global function has been removed from the cxGraphics unit. Use the dxColorToRGBQuad global function from the dxCore unit instead. 2. Breaking Change – The dxBuildNumber global constant has been moved from the cxClasses unit to the dxCore unit. 3. Breaking Change – The TcxComponentEditor class has been renamed to TdxComponentEditor, and moved from the cxLibraryReg unit to the dxCoreReg unit. Build 42 1. Breaking Change – The following global functions were moved from the cxControls unit to the dxCore unit:
l IsWin95X l IsWin2K
Page 9 of 938
l IsWin2KorXP l IsWinNT l IsWinVista l IsWinXP
2. Breaking Change – A number of global functions were removed from product units. You need to use the following code equivalents from the dxCore unit:
3. Breaking Change – The TcxContainer.InnerControlDefaultHandler function is no longer virtual. Now, instead of overriding this function, override the TcxContainer.DoInnerControlDefaultHandler function in your TcxContainer descendants. 4. A generic exception class for our controls – EdxException – was introduced in the dxCore unit. This class is used for all generic exceptions, and as the base class for all custom exception classes declared in the following VCL controls:
l ExpressQuantumGrid v6 l ExpressBars v6 l ExpressScheduler v3 l ExpressPivotGrid v2 l ExpressQuantumTreeList v4 l ExpressVerticalGrid l ExpressNavBar v2 l ExpressPrinting System v3 l ExpressLayout Control l ExpressSpellChecker l ExpressSpreadSheet l ExpressEditors Library l ExpressPageControl l ExpressDocking Library l ExpressMemData
Product Function Code Equivalent
Express Cross Platform Library IsWindowsXPOrLater IsWinXPOrLater
ExpressPrinting System IsWin2KOrXP IsWinXPOrLater
IsWinXP IsWinXP
IsWinNT IsWinNT
IsWin95Or98 IsWin9X
IsWinMeOr2K (IsWinMe or IsWin2KorLater)
ExpressLayout Control IsWin98Or2000 (not IsWin95)
ExpressSpreadSheet IsWinNT IsWinNT
Page 10 of 938
l Express Cross Platform Library.
This allows you to easily filter and accurately handle exceptions raised in your applications. Build 41 1. The TdxResourceStringsRepository.UpdateDependentComponents method has been replaced by the TdxResourceStringsRepository.NotifyListeners method. The TdxResourceStringsRepository is declared in the dxCore unit, and it is implicitly used by the TcxLocalizer component. 2. Now, standard and third-party controls that use the IdxLocalizerListener interface for localization purposes must be explicitly registered and unregistered as the TcxLocalizer‘s listeners using the TdxResourceStringsRepository.AddListener and TdxResourceStringsRepository.RemoveListener methods. To learn how to translate the control’s UI using the IdxLocalizerListener interface, refer to the How To Localize an Application Using the TcxLocalizer help topic. 3. Breaking Change – In the cxContainer unit, the SetWindowShadowRegion global function was extended with an AShadowBoundsExtent parameter, which specifies how a shadow is stretched. Previously, TRect passed as the R parameter specified the region that casts a shadow. Now, this region should be passed as the AShadowBounds parameter. To retain the SetWindowShadowRegion functionality as in previous Builds, pass this region as the AShadowBounds parameter and pass cxEmptyRect as the AShadowBoundsExtent parameter. 4. Breaking Change – A TcxOwnedInterfacedCollection class has been introduced as a common ancestor for collections containing information about their owners. As a result, the following classes now inherit from the TcxOwnedInterfacedCollection class:
l TdxBarCaptionButtons in the dxBar unit. l TcxGridBands in the cxGridBandedTableView unit. l TcxCheckListBoxItems in the cxCheckListBox unit. l TcxButtonGroupItems in the cxGroupBox unit.
5. Breaking Change – The TcxInterfacedCollectionItem class was moved from the cxInplaceContainer unit to the cxClasses unit. The following classes now inherit from the TcxInterfacedCollectionItem class:
l TcxLookupGridColumn in the cxLookupGrid unit. l TcxFilterItem in the cxDBFilterControl unit. l TcxGridBand in the cxGridBandedTableView unit. l TcxPropertiesStoreComponent in the cxPropertiesStore unit. l TdxBarCaptionButton and TdxBarItemLink in the dxBar unit.
Build 40 1. The following methods have been moved from the dxMdaSet unit to the dxCore unit:
l ReadBufferFromStream l ReadBoolean l ReadByte l ReadInteger l ReadWord l WriteBoolean l WriteByte l WriteInteger l WriteWord l WriteCharToStream l WriteDoubleToStream
Page 11 of 938
l WriteIntegerToStream l WriteSmallIntToStream l WriteStringToStream l WriteBufferToStream
2. The following methods have been moved from the cxClasses unit to the dxCore unit:
l cxZeroMemory l cxAllocMem l cxFreeMem l cxCopyData l ReadBoolean l ReadByte l ReadInteger l ReadWord l WriteBoolean l WriteByte l WriteInteger l WriteWord l cxBinToHex l cxHexToBin
3. The FillZeroData and CopyData methods have been removed from the dxMdaSet unit. Use the cxZeroMemory and cxCopyData methods from the dxCore unit instead. Build 37 1. The TcxStorageType type has been moved from the cxPropertiesStore unit to the cxStorage unit. 2. By default, the ExpressNavBar and ExpressDocking Library create device-dependent bitmaps. Due to hardware acceleration, these bitmaps are painted faster than device-independent bitmaps. So, to improve performance, device-dependent bitmaps are created. However, displaying large device-dependent bitmaps may lead to EOutOfResources exceptions. To help overcome these problems when using large bitmaps in the aforementioned products, we introduced a cxDoubleBufferedBitmapPixelFormat global variable in the cxGraphics unit. By default, this variable is set to pfDevice indicating that device-dependent bitmaps are created. To create device-independent bitmaps, set this variable to pf32bit before creating problematic forms. Build 31 1. TcxImageList save format to .dfm files has been changed. Loading forms that contain TcxImageList components from Build 31 or later, fails when using older Builds. As a result, image lists will be empty. To properly load these forms, do the following:
l Install Build 31. l Add {$DEFINE cxImageListOldSaveFormat} to the cxGraphics unit as shown below:
//Delphi // ... {$DEFINE cxImageListOldSaveFormat} unit cxGraphics; // ...
l Run the Express Install in Recompile mode. l Save the forms. Now TcxImageList controls will be saved to .dfm files using old format.
Page 12 of 938
After this, you can install Build 30 or earlier, and load the forms correctly. 2. In the cxGraphics unit, the TcxImageList.Replace function has been re-declared as a procedure. Now, no resulting value indicating whether image replacement was successful is returned. Build 30 1. Now, all message identifiers for Developer Express products are based on the WM_DX constant, which is declared as follows: WM_DX = WM_APP + 100; To avoid conflicts with our message identifiers, define your own message identifiers between WM_APP and WM_DX. 2. In the cxClasses unit, the TTag type has been renamed to TcxTag. This eliminates conflicts with the standard HTTPProd.TTag type. Build 28 In the cxGraphics unit, the cxBitmapToTrueColorBitmap global procedure has been renamed to cxMakeTrueColorBitmap. A new parameter to return the resulting bitmap has been added to this procedure.
Page 13 of 938
Built-in Fading Animation
UI elements in DevExpress controls provide built-in support for fading animation, which is played in response to mouse hover events. The current implementation includes fading animation support for the following UI elements:
l Scrollbars in DevExpress controls; l Buttons in standalone and in-place editors from the ExpressEditors Library; l Borders and background in standalone editors from the ExpressEditors Library; l Bar items, tabs, tab groups, and the Application Button in the Ribbon control shipped with the ExpressBars Suite. For
more information, refer to the "Fading Animation" section of the Ribbon Control topic; l Bar items in standard toolbars and menus built with the ExpressBars Suite; l TcxButton controls.
Fading animation is played for these UI elements provided that the following conditions are met:
l The native style, skin, or Ribbon color scheme is applied; l UI elements are not custom painted.
You can call the dxFader function declared in the dxFading unit to access a TdxFader object which allows you to control fading animation effects within an application. Fading Animation Effects Fading animation includes the fade-in and fade-out animation effects, which are played in the following pattern:
l A UI element fades-in when the mouse pointer enters its area; l A UI element fades-out once the mouse pointer leaves its area.
You can customize the animation speed and smoothness via the dxFadeInDefaultAnimationFrameCount, dxFadeInDefaultAnimationFrameDelay, dxFadeOutDefaultAnimationFrameCount, and dxFadeOutDefaultAnimationFrameDelay global constants. Important Note: Fading animation can only be played if the Microsoft GDI+ library is installed and the color depth set in the Operating System is greater than 16-bit.
Page 14 of 938
Integrated Touch Gesture Support
Most of DevExpress controls provide built-in support for Windows Touch gestures – no additional coding or links to a standard VCL gesture manager are required. Touch support is available in all supported IDEs, including Delphi 7, Delphi 2007, and C++ Builder 2007. Refer to the "Windows Touch Gestures Overview (Windows)" MSDN article at http://msdn.microsoft.com/en-us/library/windows/desktop/dd940543(v=vs.85).aspx for general information on Windows Touch gestures. The following touch capabilities are available to your end-users out of the box:
l Content scrolling with single-finger panning in all scrollable DevExpress controls. To further improve the end-user touch experience, enable per-pixel scrolling;
l Image sliding with single-finger panning in the TdxImageSlider control; l Content zooming in the ExpressFlowChart and cxImage controls, and the Print Preview window of the ExpressPrinting
System; l Content rotation in the ExpressOrgChart control.
Touch Mode Touch mode is designed to enhance the touch experience for our VCL controls and makes it easy to enable the enhancements in your application. The enhancements include touch-friendly sizes of UI elements and their touchable areas, adjusted text alignment settings, and other control-specific improvements. You can toggle the Touch mode using the TouchMode property in a look and feel controller or skin controller. The screenshot below illustrates Touch mode adjustments in a Ribbon UI.
Page 15 of 938
Note: Size adjustment calculations in Touch mode are based on the minimum square size of a touchable element defined by the cxTouchElementMinSize global constant. You can customize the default value of the constant to meet the requirements of your users. Standalone ExpressEditors located in a layout control are automatically resized in Touch mode, provided that their AutoSize property is set to True.
Page 16 of 938
Multi-Threaded Data Processing
Data controllers implement multi-threaded algorithms to help you fully exploit the power of modern CPUs when it comes to dealing with large amounts of data in "classic" data loading modes – when data-aware operations are performed on the client side, rather than on the server side (as in server mode). These algorithms significantly improve (two or more times faster, based on the CPU architecture) sorting, filtering, or grouping data in "classic" data loading modes. The multi-threaded algorithms are enabled by default; however, you can always switch to use the previous version by assigning False to the dxEnableMultiThreading global constant declared within the dxThreading unit. You can also choose an algorithm version for your entire application (using the dxDefaultMultiThreadedFiltering and dxDefaultMultiThreadedSorting global constants declared within the cxCustomData unit) or select the algorithm version for individual controls. The table below lists the DevExpress controls that support multi-threaded data processing and related options.
When implementing thread-safe TcxCustomDataSource descendants for use in provider mode, override their IsMultiThreadingSupported function to return True in order to enable support for multi-threaded data processing. Note: We recommend that you disable the use of multi-threaded algorithms and select the previous algorithm versions only if custom filtering/sorting implementations are not thread-safe. Refer to the descriptions of the related options listed above to learn more.
Control Related Options
ExpressQuantumGrid The View's DataController.MultiThreadedOptions option set.
ExpressQuantumTreeList The tree list’s OptionsData.MultiThreadedSorting property.
ExpressVerticalGrid The vertical grid’s OptionsData.MultiThreadedFiltering property.
Page 17 of 938
Using the cxPropertiesStore component When writing a complex application with a large number of settings, you may need to restore component properties. The ExpressQuantumGrid Suite provides the cxPropertiesStore component implementing this functionality. By default, the cxPropertiesStore component allows restoring settings upon application creation and saving settings upon application shutdown. Of course, you can perform saving/restoring whenever you like. This topic covers all aspects of the cxPropertiesStore functionality. Let’s consider the use of cxPropertiesStore. This topic contains two examples of using cxPropertiesStore – at design time and via code. The cxPropertiesStore will be used to save/restore cxGrid properties. Perform the following steps to follow the examples of this topic. Create an empty application. Place a cxGrid component on a form. Create a table view and bind it to the Films table from the VideoCatalodDB.mdb demo database. Setup the grid control as described in the table view tutorial. Next, add another level with an associated table view, name them lvFilmsCheck and tvFilmsCheck and repeat the tutorial steps for the new view. Place the cxPropertiesStore component on the form and name it cxStore. The result is shown by the following screenshot:
1. DESIGN TIME USAGE
This chapter shows how to use cxPropertiesStore at design time and describes its default functionality. This implies that the settings are saved when the application is closed and restored when it is restarted. The example will operate on the settings of the tvFilms view and the tvFilmsCOLOR & tvFilmsYEAR columns. Double-click on the cxPropertiesStore component’s icon. This invokes the PropertiesStore Editor:
Page 18 of 938
The editor displays a tree structure of all the components residing on the form containing the cxPropertiesStore. The Editor buttons’ functions are listed below:
Click the plus sign next to the cxGrid component and examine the properties available:
Button Function
Groups the Editor tree by components.
Groups the Editor tree by properties.
Restores the last saved selection. The current Properties/components grouping option is saved when the dialog is closed (by pressing the OK button).
Selects all components/properties within the tree.
Clears all selected rows.
Inverts row selections. If you need to select most items, select just the ones you don’t need and then click on this button.
Page 19 of 938
You can select all the component’s properties you want to save/restore by right-clicking the component name within the tree. The following image demonstrates how to select all the properties of the tvFilmsYEAR and tvFilmsCOLOR columns:
Page 20 of 938
Also, you can select individual component properties by right-clicking these property names within the tree. The following image demonstrates how to select the tvFilms view options:
Having selected the required components and their properties, you need to specify the StorageType and StorageName property
Page 21 of 938
values. For the purposes of this example, set the StorageType property value to stRegistry and the StorageName property value to "View Storage":
This tells the cxPropertiesStore component to store settings within the registry in the View Storage key. Ensure that the Active property of the cxPropertiesStore component is set to True. Otherwise, cxPropertiesStore will not save/restore the selected settings automatically. Run the application. Ungroup the tvFilms and tvFilmsCheck views by dragging the Release Year column header to the column panel. Close the application and run it again. Runtime changes are restored for the tvFilms view and its columns. The tvFilmsCheck view appears with the design time settings, because its properties were not selected for saving. The following screenshot demonstrates the View Storage registry key structure:
Another way of selecting the properties for saving/restoring is by using the Components property. Select the cxPropertiesStore component. Invoke the Object Inspector and click the ellipsis button next to the Components property. This invokes the Components collection editor:
Page 22 of 938
This collection contains references to all components, which you have previously selected. Select the first component reference (corresponding to the tvFilms view) and switch to the Object Inspector. Click the ellipsis button next to the Properties property. This displays the list of properties selected for saving/restoring:
Go to the "OptionsCustomize" line and add the ColumnGrouping options name, by changing the line to "OptionsCustomize.ColumnGrouping":
Page 23 of 938
The following screenshot demonstrates the result of saving after this change:
As you can see, now only the ColumnGrouping option value is saved instead of the whole OptionsCustomize set. You can also save/restore properties at design time. For this purpose, select the required properties via the cxPropertiesStore editor. Then right-click the cxPropertiesStore component and choose the Save or Restore item from the context menu:
Page 24 of 938
The StorageType and StorageName properties specify the storage used for design time saving/restoring.
2. USING VIA CODE
This chapter describes how to use cxPropertiesStore by code and this approach provides more flexibility. There are two features of cxPropertiesStore only available when writing code:
1. Saving/restoring individual components from the Components collection. 2. Saving/restoring individual Components items from a storage, different from the one specified by the StorageType and
StorageName properties.
The code below handles the OnCreate event of the form to save the properties of a footer summary item. It selects the Column, Kind and Format properties of the first footer summary item for saving. The Active property must be set to False before saving is performed. This disables the default functionality of the cxPropertiesStore component. Saving is implemented Call the StoreToIniFile method to save the required item of the Components collection. Note that this method saves footer summary item properties to an INI file, though the StorageName and StorageType properties of the cxStore component specify a registry key as a storage. The RestoreButtonClick event handler restores the footer summary item settings by calling the RestoreFromIniFile method: //Delphi var
PSComponent: TcxPropertiesStoreComponent; //... procedure TForm1.FormCreate(Sender: TObject); begin //disabling the default functionality of the cxPropertiesStore component
cxGridStore.Active := False; //adding an item to the Components collection
PSComponent := TcxPropertiesStoreComponent(cxGridStore.Components.Add); with PSComponent do begin //setting a table view for saving
Component := tvFilms; //selecting the Column, Kind and Format property values of the first footer summary item for
Page 25 of 938
saving Properties.Add('DataController.Summary.FooterSummaryItems.0.Column'); Properties.Add('DataController.Summary.FooterSummaryItems.0.Kind'); Properties.Add('DataController.Summary.FooterSummaryItems.0.Format'); //saving the selected properties to an INI file (note that design time settings designate the registry key as a storage). The storage file is recreated upon saving StoreToIniFile('c:\store.ini', True); end; end;
//... procedure TForm1.RestoreButtonClick(Sender: TObject); begin //restoring the footer summary item settings without involving any other Components collection items PSComponent.RestoreFromIniFile('c:\store.ini'); end; //...
//C++ Builder TcxPropertiesStoreComponent *PSComponent; //... void __fastcall TForm1::FormCreate(TObject *Sender) { //disabling the default functionality of the cxPropertiesStore component cxGridStore->Active = false; //adding an item to the Components collection
PSComponent = (TcxPropertiesStoreComponent*)cxGridStore->Components->Add(); //setting a table view for saving
PSComponent->Component = tvFilms; //selecting the Column, Kind and Format property values of the first footer summary item for saving PSComponent->Properties->Add("DataController.Summary.FooterSummaryItems.0.Column"); PSComponent->Properties->Add("DataController.Summary.FooterSummaryItems.0.Kind"); PSComponent->Properties->Add("DataController.Summary.FooterSummaryItems.0.Format"); //saving the selected properties to an INI file (note that design time settings designate the registry key as a storage). The storage file is recreated upon saving PSComponent->StoreToIniFile("c:\\store.ini", true); }
//... void __fastcall TForm1::RestoreButtonClick(TObject *Sender) { //restoring the footer summary item settings without involving any other Components collection items PSComponent->RestoreFromIniFile("c:\\store.ini"); }
//...
The result of the code execution (store.ini file contents) is demonstrated below: [tvFilms: TcxPropertiesStoreComponent] = DataController.Summary.FooterSummaryItems.0.Column=tvFilmsRUNTIME DataController.Summary.FooterSummaryItems.0.Kind=skMax DataController.Summary.FooterSummaryItems.0.Format=MAX=0 minutes
Page 26 of 938
Page 27 of 938
Using the Image List Editor See Also The Express Cross Platform Library provides an image list component – TcxImageList. Unlike the standard image list, it allows you to store 32-bit images (including PNG images) and paint them with alpha blending. In this topic, you will learn how to use this component’s design-time editor. How to Invoke the Image List Editor To invoke this editor, double-click the TcxImageList component or choose Edit… from its context menu.
Image List Editor UI
Element Description
Images section Displays all the images stored within the image list. As with the standard TImageList Editor, you can select multiple images within the list using the mouse and by holding the Shift and Ctrl keys. The last image in the selection is displayed within the ‘Selected Image’ section.
Selected Image section
Displays the selected image. The transparency checkerboard allows you to detect transparent areas and evaluate the alpha blending parameters of the image.
Transparent Color Displays the transparent color for the selected image. When an image is added or imported from other image lists, its bottom-left pixel specifies the
Page 28 of 938
transparent color. You can change this color via the dropdown list or by clicking directly on a pixel in the selected image. Note: You cannot modify the transparent color for images with alpha channel and icons. It’s always clNone.
Add Image Clicking "Load From Disk" in the dropdown menu invokes the File Open dialog to load images from files. Clicking "Load From DevExpress Icon Library" invokes the Image Picker dialog to load images from our Icon Library. You can select multiple files in these dialogs. Selected images may be cut into pieces depending on the image list’s Width and Height properties. Resulting images are appended to the list.
Replace Image Similar to Add Image. The only difference is that the last image in the selection is replaced with the images loaded from files.
Delete Image Removes the selected images from the list.
Clear List Removes all images from the list.
Export Images Invokes the Save As dialog to save the selected images to a bitmap or PNG file. Use the dialog to specify the file name and location.
Import Images This button is enabled when there is at least one image list (a TCustomImageList descendant) with image dimensions matching the current image list. Click this button to display a dropdown list populated with all suitable image lists. Choose an item in the dropdown list to append all images from the corresponding image list to the current image list.
Convert All Images to 32-bit
Converts all images stored in the image list to 32-bit images. We recommend that you convert all images loaded to the image list to improve painting performance.
Image Size Combo Box
Allows you to assign the image dimensions by selecting one of the standard dimensions listed in a dropdown window.
OK Applies all pending changes to the image list and closes the Image List Editor.
Cancel Discards all pending changes to the image list and closes the Image List Editor.
Apply Applies all pending changes to the image list.
Page 29 of 938
Localizer Editor UI See Also
The Localizer Editor is used to translate resource strings that will then be used for application localization.
The Localizer Editor provides a grid containing a list of resource strings for all Developer Express products. The first grid band – Resource Strings – contains the following columns:
l Resource String Name – lists resource string identifiers. l Original Value – lists resource string values as they were defined in Developer Express libraries.
Other bands are created dynamically for each language specified in the editor. A language band contains the following columns:
l Resource String Value – lists resource string values that correspond to the specified language. l Translated – provides check boxes indicating that resource strings are translated. A check box is checked automatically
if the corresponding Resource String Value item has been changed. To restore the default value (as it was specified in a Developer Express library), uncheck the check box.
The Localizer Editor’s main menu allows you to perform the following operations: File:
l New – creates a new resource strings file. l Open – opens an existing resource strings file. l Reopen – opens a previously opened resource strings file. l Save or Save As… – saves localized resource strings to .INI and .PAS files (a .PAS file contains custom resource
strings). l Build Resource File… – saves localized resource strings to a .RES file. This file is a storage alternative to .INI and .PAS
files. The Localizer Editor allows you to convert the content in the .INI format into the .RES format. For this purpose,
Page 30 of 938
open an .INI file in the editor, and then save the content in the .RES file using this menu.
l Close – closes a file. l Exit – closes the Localizer Editor.
View:
l Expand All or Collapse All – expands or collapses all rows in the grid.
Languages:
l Add… or Delete… – invokes the Choose Languages dialog. Use the dialog to add or remove languages to / from the file.
Options:
l Save As Unicode – if checked, the content is saved in the Unicode format. Otherwise, resource strings are stored in the ANSI format. The Unicode format is supported by platforms starting from version Delphi 2009. Platforms prior to Delphi 2009 only support the ANSI format.
By default, the check box is unchecked. To save the file as Unicode encoded, make certain that the check box is checked. Note that this option is ignored if resource strings are to be stored in the .RES file.
l Autosave Custom Resource Unit – if checked, custom resource strings are automatically saved to a .PAS file.
Custom Resource Strings:
l Add – adds custom resource strings to the file. If Add is clicked for the first time, the editor creates a Custom Resource Strings group row, and adds a blank data row, in which you can enter a custom resource string identifier, and the corresponding values for each language.
l Delete – removes custom resource strings from the file. l Build Custom Resource Unit… – saves custom resource strings to a .PAS file. This is only used if the storage for
localized resource strings is an .INI file.
Page 31 of 938
How To Create Localized Strings Using the Localizer Editor See Also
This topic describes how you can use the Localizer Editor to prepare localized strings for the German language. To learn how to localize an application using localized strings and the TcxLocalizer component, refer to the How To Localize an Application Using the TcxLocalizer help topic. Follow the steps below:
1. Run the Localizer Editor application. 2. Click File | New to create a new resource strings file that will contain all the specified resource strings. 3. Click Languages | Add… to open the Choose languages dialog. In the dialog, check the German (Germany) check
box, and press the OK button to add the German language to the file.
4. For the cxSDatePopupClear and cxSDatePopupToday resource identifiers (which are defined in the ExpressEditors Library for the TcxDBDateEdit control’s Clear and Today button captions), specify the translated string in the Resource String Value column located in the German (Germany) band. Once specified, the corresponding check box in the Translated column is checked automatically. It informs the Localizer Editor that a localized string for German is provided.
Page 32 of 938
5. Specify the custom resource string for the form’s caption of an application, which will be translated to German. To do this, click Custom Resource Strings | Add. A Custom Resource Strings category row and an empty data row are added to the grid. Enter the sAppName string in the Resource String Name column, the Localization Demo string in the Original Value of the Resource Strings band, and the Lokalisierung Demo string in the German (Germany) band’s Resource String Value column.
6. Save localized resource strings in the storage.
l If the .INI file is used for the translation, click File | Save. This also saves custom resource strings in the .PAS file (in the example, files are named Languages.INI and LocalizationResUnit.PAS).
l If the .RES file is used for the translation, click File | Build Resource File…. This file contains both standard and custom resource strings.
Page 33 of 938
The following example shows the Languages.INI file’s content: [1031] cxSDatePopupClear="Lцschen" cxSDatePopupToday="Heute" sAppName="Lokalisierung Demo" [Custom Resource Strings] sAppName="Localization Demo" Number 1031 in square brackets indicates the German language’s locale. The following example shows the LocalizationResUnit.PAS file’s content: // Delphi unit LocalizationDemoResUnit; interface uses dxCore; resourcestring sAppName = 'Localization Demo'; implementation procedure AddResourceStringNames(AProduct: TdxProductResourceStrings); begin AProduct.Add('sAppName', @sAppName); end; initialization dxResourceStringsRepository.RegisterProduct('Custom Resource Strings', @AddResourceStringNames); finalization dxResourceStringsRepository.UnRegisterProduct('Custom Resource Strings'); end.
Now these files can be used with the TcxLocalizer component for application localization. Refer to the How To Localize an Application Using the TcxLocalizer help topic, to learn how to translate the application.
Page 34 of 938
How To Localize an Application Using the TcxLocalizer See Also
This topic describes how you can translate the TcxDBDateEdit control’s (from the ExpressEditors Library) and the standard form’s user interface to German using the TcxLocalizer component. To follow this lesson's steps, you need to first go through the following tutorial: How To Create Localized Strings Using the Localizer Editor. Follow the steps below:
1. Drop the TcxLocalizer component ( ) onto a form from the Component Palette’s Dev Express page. 2. Specify the resource strings file created with the Localizer Editor:
If the .INI file is used – in the Object Inspector, click the ellipsis button next to the TcxLocalizer.FileName property, to specify the path to the .INI resource strings file (in the example, the Languages.INI file). Set the TcxLocalizer.StorageType property to lstIni.
If the .RES file is used – specify it in the implementation clause, as shown in the following example: // Delphi // ... implementation {$R Languages.RES} // ... Set the TcxLocalizer.StorageType property to lstResource.
3. Make certain that the TcxLocalizer.Active property is True. 4. Using the TcxLocalizer.Locale property, select the German (Germany) locale into which the application will be translated.
Note that by default, the TcxLocalizer.Locale property is English (Original translation). This value means that the
Page 35 of 938
TcxLocalizer will use resource strings specified in Developer Express libraries. These strings do not correspond to any qualified locale.
5. To translate an application form using localized custom resource strings, do the following:
l Specify the .PAS file in the uses clause (in the example, the LocalizationResUnit unit). l Specify the IdxLocalizerListener interface in the form declaration, register the form with the
TdxResourceStringsRepository instance (this instance is referenced by the built-in dxResourceStringsRepository variable) as a listener, and obtain values from the corresponding custom resource strings in the interface’s TranslationChanged method.
The following example demonstrates how to translate the form’s caption using the sAppName custom resource string: // Delphi // ... uses cxLocalization, dxCore, <LocalizationResUnit>; type TForm1 = class(TForm, IdxLocalizerListener) cxLocalizer1: TcxLocalizer; constructor Create(AOwner: TComponent); override; destructor Destroy; override; // ... public procedure TranslationChanged; end; // ... procedure TForm1.Create(AOwner: TComponent); begin dxResourceStringsRepository.AddListener(Self); inherited Create(AOwner); end; procedure TForm1.Destroy; begin dxResourceStringsRepository.RemoveListener(Self); inherited; end; procedure TForm1.TranslationChanged; begin Caption := cxGetResourceString(@sAppName); // ... end; Run the application to see the result.
Page 36 of 938
Page 37 of 938
TcxCanvas Object Hierarchy Properties Methods An enhanced device context wrapper compared with the standard VCL canvas. Unit cxGraphics TcxCanvas = class(TObject)
Description The TCanvas class enables you to use device contexts in a convenient and easy to understand OOP style. The TcxCanvas class also provides access to the device context API. But in comparison with TCanvas, it provides additional useful functions such as DrawFocusRect and DrawFrame. The class is not derived from TCanvas, but it uses a TCanvas class instance to store data. This canvas can be accessed via the TcxCanvas.Canvas property.
Page 38 of 938
TcxComponentCollection Object Hierarchy Properties Methods Represents a collection of components. Unit cxClasses TcxComponentCollection = class(TPersistent) Description The TcxComponentCollection class introduces members that allow you to:
l Determine the number of elements in the collection (Count property); l Access a particular element (Items property); l Check whether a given component is in a collection (FindItemByID method); l Manage elements in the collection (the Add, Insert, Delete, and Clear methods).
Page 39 of 938
TcxComponentCollectionItem Object Hierarchy Properties Methods The TcxComponentCollectionItem class implements an element of the TcxComponentCollection collection. Unit cxClasses TcxComponentCollectionItem = class(TComponent) Description The goal of designing the TcxComponentCollectionItem class as the TComponent’s descendant is to make the Delphi IDE aware of a collection element as a component. The TcxComponentCollectionItem class allows the unique identifier of the current element to be determined (see the ID property) and its index in the collection (see the Index property).
Page 40 of 938
TcxCustomContainerStyle Object Hierarchy Properties Methods Events Represents the style settings which can be applied to the associated container control. Unit cxContainer TcxCustomContainerStyle = class(TPersistent)
Description The TcxCustomContainerStyle class introduces properties that control the appearance of the associated container control. The following style characteristics can be modified:
l Border color, style and displayed edges (BorderColor, BorderStyle, and Edges); l Background color (Color); l Font (Font); l Displaying shadow (Shadow); l Look & feel (LookAndFeel) - you can either use the native style defined by the operating system or apply one of the three
predefined styles; l Color and style for the text (TextColor and TextStyle).
The TcxCustomContainerStyle class is a base class for the container control and editor styles.
Page 41 of 938
TcxCustomLookAndFeelPainter Object Hierarchy The base class for painter classes that are influenced by look and feel settings. Unit cxLookAndFeelPainters TcxCustomLookAndFeelPainter = class(TObject);
Description TcxCustomLookAndFeelPainter descendants override the ancestor’s virtual methods to draw primitives based upon a specific look and feel style. For instance, the TcxWinXPLookAndFeelPainter class implements drawing primitives using the Windows® XP theme. Controls are not aware of a particular painter class used to render them. They only know the interface of the TcxCustomLookAndFeelPainter class and call its virtual methods. These methods are used to draw various control UI elements:
l Buttons: DrawButton, DrawButtonBorder, DrawExpandButton, DrawCheckButton, etc.; l Headers: DrawHeader, DrawHeaderBorder, DrawHeaderPressed, etc.; l Indicators: DrawIndicatorItem, DrawIndicatorImage, etc.; l etc.
This concept provides flexibility when implementing various paint styles.
Page 42 of 938
TcxCustomPropertiesStore Object Hierarchy Properties Methods Example The base class for the TcxPropertiesStore component. Unit cxPropertiesStore TcxCustomPropertiesStore = class(TComponent)
Description This class defines the essential functionality for the TcxPropertiesStore component. It provides an API that allows you to persist the published properties of any components residing on the same form as a TcxPropertiesStore component in a specific storage (the registry, an INI file, or stream). If the property selected for saving/restoring represents a TPersistent descendant, all its sub-properties can be stored/restored. For instance, if you specify the control’s Font property to store, all its published sub-properties (Charset, Color, Height, Name, Pitch, Size and Style) will be saved as well. You can insert the "Font.Style" string into the component’s Properties list instead of "Font" to save only the Style property of the TFont object associated with the Font property. The TcxPropertiesStore component enables you to save/restore properties of TCollection elements. For instance, this can be used to save summary items (TcxDataSummary.FooterSummaryItems, TcxDataSummary.DefaultGroupSummaryItems, TcxDataSummary.SummaryGroups), bands in a grid control (TcxGridBandedTableView.Bands), etc. At design time, the TcxPropertiesStore only allows you to select entire collections for storing/restoring. Using code though, allows saving individual items from collections, as well as the properties of a particular collection item. When restoring elements from storage, the collection must contain the same number of items as in the storage. The TcxPropertiesStore component does not allow you to store/restore sub-properties of the properties derived from the TComponent class. When a property references a TComponent descendant, only the object’s Name is saved. To select components to store/restore using the TcxPropertiesStore object, you should add items to its Components collection. Every element in the collection represents a TcxPropertiesStoreComponent instance referring to the component and its properties. The component and its properties are specified by the TcxPropertiesStoreComponent.Component and TcxPropertiesStoreComponent.Properties attributes respectively. If you do not specify any properties via the TcxPropertiesStoreComponent.Properties list, no properties will be stored to/restored from the storage. The TcxPropertiesStore component automatically restores properties of selected components when the form owning the component is created. On destroying the form, the TcxPropertiesStore automatically overwrites (or creates) the storage and saves the properties of selected components. This default behavior may be disabled by setting the Active property to False. In this case, the selected components’ settings can still be saved/restored by calling the StoreTo/RestoreFrom methods manually. The storage used for saving component settings is specified by two properties: StorageType and StorageName. The StoreTo/RestoreFrom methods allow you to save/restore properties for all selected components. To operate on individual components, you need to call the StoreTo.../RestoreFrom... methods (for instance, StoreToRegistry or RestoreFromStream) of the corresponding TcxPropertiesStoreComponent instances within the Components collection.
Page 43 of 938
TcxCustomStyle Object Hierarchy Properties Methods See Also Represents a base class for styles which notify listeners about attribute changes. Unit cxStyles TcxCustomStyle = class(TComponent);
Description The TcxCustomStyle class implements the functionality required by listeners to notify them about changes to style attribute using their StyleChanged and StyleRemoved methods. The TcxStyle class is a descendant of the TcxCustomStyle class which introduces style attributes that are shared by all components, namely the background color, font details and text color. When any of the style attributes are changed, all listeners are notified. TcxCustomStyles supports an abstract collection of styles, each of which is presented by the TcxCustomStyle class. Descendants of the TcxCustomStyles class declare appropriate styles for different control elements depending upon the control’s type. TcxCustomStyles receives notifications about style attribute changes via its StyleChanged and StyleRemoved methods. When such notifications are received, the corresponding control elements are repainted.
Page 44 of 938
TcxCustomStyles Object Hierarchy Properties Methods See Also Represents a collection of style links for various component elements. Unit cxStyles TcxCustomStyles = class(TcxInterfacedPersistent);
Description The TcxCustomStyles class supports an abstract collection of style links for various component elements. Descendants of the TcxCustomStyles class declare appropriate styles for different control elements depending upon the control’s type. The style of each control element is represented by an object of the TcxCustomStyle class. The style of every element is represented by an instance of the TcxCustomStyles or TcxStyle class. It’s possible to assign the same styles to several elements and even to different TcxCustomStyles objects. TcxCustomStyles provides the StyleChanged and StyleRemoved methods which are used to respond to style changes and adds itself as a listener of its TcxCustomStyle elements. When any of the TcxCustomStyle attributes are changed, TcxCustomStyles receives a notification and updates the corresponding control elements. The StyleSheet property specifies the style sheet applied to the current collection of style links. A style sheet represents a collection of styles for the elements of controls supporting Styles technology (for instance, a grid view). Instead of specifying individual styles for each control element, you can assign it a style sheet, thus providing values for all style properties.
Page 45 of 938
TcxCustomStyleSheet Object Hierarchy Properties Methods See Also Represents the base class for all style sheets. Unit cxStyles TcxCustomStyleSheet = class(TcxComponent); Description A style sheet represents a collection of styles for elements of controls supporting Styles technology (for instance, a grid view). Instead of specifying individual styles for a control element, you can assign it a style sheet, thus providing values for all style properties. To assign a style sheet to a control element, use the StyleSheet property inherited from the TcxCustomStyles class. The TcxCustomStyleSheet object implements functionality common to all style sheets. It is the base class and does not actually provide any style properties. Descendants of the class publish style properties specific to a control element for which style sheets are designed. For instance, the TcxGridTableViewStyleSheet class declares styles specific to a grid table view. Styles and style sheets are usually stored within a style repository (a TcxStyleRepository component) that provides WYSIWYG styles and style sheet editing capabilities. The style repository editor gives you the ability to create a style sheet of a specific type, adjust its properties, add predefined style sheets, load from and save style sheets to an INI file. You can also load/save style sheets to an INI file programmatically via the LoadStyleSheetsFromIniFile and SaveStyleSheetsToIniFile procedures respectively.
Page 46 of 938
TcxDialogMetricsInfo Object Hierarchy Properties See Also The TcxDialogMetricsInfo represents the dialog information. Unit cxClasses TcxDialogMetricsInfo = class(TObject) Description The dialog information – built-in layout settings and custom settings (provided by the IcxDialogMetricsInfoData implementer) – is stored with the TcxDialogsMetricsStore for further use during the application session. This class implements multiple properties that store built-in layout settings. The dialog’s custom information is stored with the TcxDialogMetricsInfo.Data property. The TcxDialogMetricsInfo is used internally by the TcxDialogsMetricsStore.
Page 47 of 938
TcxDialogsMetricsStore Object Hierarchy Properties Methods See Also The TcxDialogsMetricsStore implements storage for dialog settings. Unit cxClasses TcxDialogsMetricsStore = class(TObject) Description The TcxDialogsMetricsStore is used to store information on the dialog (dialog layout built-in settings and custom information) during the application session. By default, the TcxDialogsMetricsStore stores dialog built-in layout settings. To store custom settings, the dialog class needs to implement the IcxDialogMetricsInfoData interface. The TcxDialogsMetricsStore can be instantiated using the cxDialogsMetricsStore routine. The following example demonstrates how to use the TcxDialogsMetricsStore, in order to provide the same dialog settings for different dialog sessions: // Delphi // ... uses // ... cxClasses; TDialogForm = class(TForm) public function ShowModal: Integer; override; end; // ... function TDialogForm.ShowModal: Integer; begin cxDialogsMetricsStore.InitDialog(Self); Result := inherited ShowModal; cxDialogsMetricsStore.StoreMetrics(Self); end;
Page 48 of 938
TcxGeometryObject Object Hierarchy Events Represents the base class for objects storing geometry-related information. Unit cxGeometry TcxGeometryObject = class(TcxOwnedPersistent) Description This class supports the internal infrastructure and is not intended to be used directly from your code. It declares the OnChange event that you can use when working with descendant classes.
Page 49 of 938
TcxImageCollectionItem Object Hierarchy Properties Methods The TcxImageCollectionItem represents an image in the image collection. Unit cxGraphics TcxImageCollectionItem = class(TcxComponentCollectionItem) Description The TcxImageCollectionItem class provides the Picture property to load the image, and the Draw method to paint the image. All other members are used to provide details about the stored image. The TcxImageCollectionItem object is referenced by the TcxImageCollectionItems.Items property.
Page 50 of 938
TcxImageCollectionItems Object Hierarchy Properties Methods The TcxImageCollectionItems represents a collection of images that are stored in the TcxImageCollection component. Unit cxGraphics TcxImageCollectionItems = class(TcxComponentCollection) Description The TcxImageCollectionItems object is referenced by the TcxImageCollection.Items property.
Page 51 of 938
TcxInterfacedPersistent Object Hierarchy Represents a base class for objects implementing interfaces which support loading and saving of properties from/to a stream. Unit cxClasses TcxInterfacedPersistent = class(TInterfacedPersistent, IUnknown);
Description The TcxInterfacedPersistent class is designed to provide support for persistent objects implementing interfaces via different versions of the IDE. If you use an IDE prior to Delphi 6, it provides the members necessary to implement the functionality for working with interfaces. Additionally, it overrides the GetOwner method so it returns the class passed as the parameter to the constructor.
Page 52 of 938
TcxLanguage Object Hierarchy Properties Represents a user interface language used for the corresponding locale. Unit cxLocalization TcxLanguage = class(TCollectionItem) Description The TcxLanguage object is referenced by the localizer’s Languages.Items property. A Dictionary stores localized strings associated with the current language.
Page 53 of 938
TcxLanguages Object Hierarchy Properties Methods Represents a collection of languages. Unit cxLocalization TcxLanguages = class(TCollection) Description The TcxLanguages object is referenced by the localizer’s Languages property.
Page 54 of 938
TcxLockedStateImageOptions Object Hierarchy Properties The base class for classes that provide display settings for a "Locked View" image. Unit cxControls TcxLockedStateImageOptions = class(TPersistent) Description A "Locked View" represents an image of a control displayed with the dark or light visual effect, and an optional message box over the image.
The TcxLockedStateImageOptions class contains display settings for a "Locked View" image. These settings include:
TcxLockedStateImageOptions is the base class for the TcxGridLockedStateImageOptions and TcxPivotGridOptionsLockedStateImage classes, which contain "Locked View" settings for the grid control and pivot grids.
Property Description
AssignedValues Specifies message box settings that override global settings.
Color Specifies the background color of the message box.
Effect Specifies the visual effect for a "Locked View" image.
Enabled Specifies whether to display a "Locked View" image.
Font Specifies the font of the message string.
ShowText Specifies whether to display a message box over a "Locked View" image.
Text Specifies the message string.
Page 55 of 938
TcxMargin Object Hierarchy Properties Events Specifies an element’s margins. Unit cxGeometry TcxMargin = class(TcxGeometryObject) Description This class introduces the following main members:
Member Description
All Applies the same margin on all sides.
Bottom Specifies the bottom margin of the element.
Left Specifies the left margin of the element.
Right Specifies the right margin of the element.
Top Specifies the top margin of the element.
Page 56 of 938
TcxLookAndFeel Object Hierarchy Properties Methods Events Specifies a TcxControl descendant’s appearance and behavior when it interacts with a user. Unit cxLookAndFeels TcxLookAndFeel = class(TcxInterfacedPersistent, IcxLookAndFeelNotificationListener);
Description Each DevExpress control has its own look and feel implemented via the TcxLookAndFeel class. This class has three properties – Kind, NativeStyle, and SkinName – that determine a control’s appearance and the manner in which the control visually responds to user actions (focus, mouse move, clicks, etc.) The NativeStyle property specifies whether to use the native windows style for control painting. This property has a higher priority than the Kind or SkinName property. If the NativeStyle property is set to True, the control is painted according to the native windows style (Currently, this feature only supported on Windows® XP or later). Otherwise, the Kind or SkinName property specifies the paint style for the control. If any of the properties mentioned above is modified, the corresponding flag is set in the AssignedValues property and the OnChanged event is raised. To reset all the flags in the AssignedValues property, call the Reset method. Importing/Exporting Look and Feel Settings Every DevExpress control can export its look and feel to other DevExpress controls. The MasterLookAndFeel property determines the imported look and feel of any DevExpress control. Any control, which imports the look and feel of the current control, is defined as a listener. It listens to changes within the current control via the IcxLookAndFeelNotificationListener interface. The IcxLookAndFeelNotificationListener interface listens for two events:
l Any look and feel setting change via the MasterLookAndFeelChanged method. l The TcxLookAndFeel class instance destruction via the MasterLookAndFeelDestroying method.
Listener controls reflect all changes within the current control. If an imported TcxLookAndFeel class instance is destroyed, a listener control obtains its look and feel settings from the cxDefaultLookAndFeelKind, cxDefaultLookAndFeelNativeStyle, and cxDefaultLookAndFeelSkinName global constants. Note: The look and feel properties of TcxControl descendants have a higher priority and override master look and feel settings. To access the painter that is used to paint the control according to the look and feel settings, use the Painter property. Root Look and Feel Settings The root look and feel (a TcxLookAndFeel class instance) is automatically created on the application startup. Its Kind, NativeStyle, and SkinName properties contain values of the cxDefaultLookAndFeelKind, cxDefaultLookAndFeelNativeStyle, and cxDefaultLookAndFeelSkinName global constants, respectively. At design and runtime, the root look and feel can be customized via the TcxLookAndFeelController and TdxSkinController components. At runtime, you can access the root look and feel via the RootLookAndFeel global function. When an instance of the TcxLookAndFeel class is created, it automatically becomes a listener of the root look and feel controller. You can change its broadcaster by assigning another look and feel to the MasterLookAndFeel property.
Page 57 of 938
TcxOwnedInterfacedCollection Object Hierarchy Properties Methods Events Represents a collection that maintains information about its owner. Unit cxClasses TcxOwnedInterfacedCollection = class(TOwnedCollection, IUnknown) Description This class introduces the OnChange event, which enables you to respond to changes to the collection.
Page 58 of 938
TcxStyle Object Hierarchy Properties Methods See Also Specifies style attributes for an element of some control. Unit cxStyles TcxStyle = class(TcxCustomStyle);
Description TcxStyle declares properties controlling the appearance of a control element. These attributes are background color, font details and text color. The AssignedValues property determines whether to use these attributes when rendering control elements. When you assign a specific style attribute, the corresponding flag is set in AssignedValues. Controls usually have to publish styles for several elements such as background, buttons, panels, etc. In this case, controls can declare a class derived from the TcxStyles class publishing specific style properties. Each property of this type represents an object of the TcxStyle class. It is possible to assign the same styles to multiple properties. When any attribute of a particular style is changed, all TcxStyles objects owning a property with this style assigned receive notification and update the corresponding control elements. You can use a style repository (TcxStyleRepository) to create and store individual styles. When a repository is destroyed, it deletes all styles it owns. The StyleRepository property indicates the repository object which owns the current style.
Page 59 of 938
TcxStyleController Object Hierarchy Properties Methods Represents the base class for objects managing style attributes common to several components. Unit cxContainer TcxStyleController = class(TComponent);
Description A style controller manages style properties common to several components. When a style is assigned a style controller, it is automatically registered as a listener of this style controller. Thus, when you change properties via a style controller, all style objects will receive corresponding notifications and repaint their components as necessary. Use the Styles property to access a specific style and call the RestoreStyles method to restore the default values to all the style attributes of every style object. The TcxStyleController is the base class for TcxEditStyleController which allows you to define style properties common to several editors.
Page 60 of 938
TcxStyles Object Hierarchy Properties Methods See Also Represents an abstract collection of styles which control the appearance of specific control elements. Unit cxStyles TcxStyles = class(TcxCustomStyles);
Description The TcxStyles class represents an abstract collection of styles for different control elements. It doesn’t introduce any new style properties, but instead provides the ability to access styles by their indexes. Each style is of the TcxStyle class and declares general style attributes, such as the background color, font details and text color. Descendants of the TcxStyles class declare appropriate styles for different control elements depending upon the control’s type. Since TcxStyles is inherited from the TcxCustomStyles class it receives notifications about style attribute changes via its StyleChanged and StyleRemoved methods. TcxStyles adds itself as a listener to all its TcxStyle elements and receives notification when any of the TcxStyle attributes are changed and the corresponding control elements are then repainted as a result.
Page 61 of 938
TdxBMPImage Object Hierarchy Properties Methods A BMP format. Unit dxGDIPlusClasses TdxBMPImage = class(TdxSmartImage) Description This type is used indirectly. Use the TdxSmartImage, as a generic type to allow automatic type cast when processing the image.
Page 62 of 938
TdxCustomGallery Object Hierarchy Properties Methods The base for classes describing gallery structure. Unit dxGallery TdxCustomGallery = class(TcxOwnedInterfacedPersistent, IdxGallery, IdxGallery1) Description This class serves as the base for the TdxGalleryControlStructure class, which is exposed via the TdxGalleryControl.Gallery property. TdxCustomGallery introduces the following primary members: Members Description
Groups Provides access to the collection of gallery groups.
ItemCheckMode Specifies how a gallery’s items can be selected.
GetCheckedItems Gets the checked items.
UncheckAll Unchecks all items.
Page 63 of 938
TdxCustomGalleryGroup Object Hierarchy Properties Methods A group in a TdxCustomGalleryGroups collection. Unit dxGallery TdxCustomGalleryGroup = class(TcxComponentCollectionItem) Description A gallery is comprised of groups - visual elements that display captions and child item collections. These groups are represented by TdxGalleryControlGroup objects derived from TdxCustomGalleryGroup. This class introduces the following main members:
TdxCustomGalleryGroup serves as the base class for TdxGalleryGroup and TdxRibbonGalleryGroup.
Member Description
ItemCount Returns the number of the items that belong to the current TdxCustomGalleryGroup.
Items Specifies the group’s items.
ShowCaption Specifies the group header’s visibility.
Visible Specifies whether the current group is visible within the control.
Page 64 of 938
TdxCustomGalleryGroupHeader Object Hierarchy Properties The base class for gallery group headers. Unit dxGallery TdxCustomGalleryGroupHeader = class(TcxOwnedPersistent) Description A header is used to visually identify a group within a gallery. TdxCustomGalleryGroupHeader serves as the base class for TdxGalleryGroupHeader and TdxRibbonGalleryGroupHeader.
Page 65 of 938
TdxCustomGalleryGroups Object Hierarchy Properties Methods A collection of groups within the TdxCustomGallery class. Unit dxGallery TdxCustomGalleryGroups = class(TcxComponentCollection) Description A gallery is comprised of groups - visual elements that display captions and child item collections. Groups are represented by TdxCustomGalleryGroup objects. TdxCustomGalleryGroups serves as the base class for TdxGalleryGroups and TdxRibbonGalleryGroups.
Page 66 of 938
TdxCustomGalleryItem Object Hierarchy Properties Methods Represents a gallery item and serves as a base class for TdxGalleryControlItem. Unit dxGallery TdxCustomGalleryItem = class(TcxComponentCollectionItem) Description A gallery consists of groups and their child items. The TdxCustomGalleryItem class represents a gallery item. Items are group content elements that display images and text (captions and descriptions) and can be manipulated (clicked) by end-users. You can access items via the parent group’s TdxGalleryGroup.Items property. This class introduces the following members:
TdxCustomGalleryItem serves as the base class for TdxGalleryItem and TdxRibbonGalleryGroupItem.
Member Description
Enabled Specifies whether the item is enabled.
Glyph Specifies the glyph displayed.
Hint Specifies whether the item displays a hint.
ImageIndex Specifies the glyph by pointing to an image from the associated image list.
Page 67 of 938
TdxCustomGalleryItems Object Hierarchy Properties Methods Represents the collection of items within the TdxGalleryControl class and serves as a base class for TdxGalleryControlItems. Unit dxGallery TdxCustomGalleryItems = class(TcxComponentCollection) Description A gallery consists of groups and their child items. Each gallery group stores a collection of items that can be accessed via the TdxGalleryGroup.Items property. TdxCustomGalleryItems serves as the base class for TdxGalleryItems and TdxRibbonGalleryGroupItems.
Page 68 of 938
TdxCustomScreenTipBand Object Hierarchy Properties The base class for classes implementing sections in the ScreenTip window. Unit dxScreenTip TdxCustomScreenTipBand = class(TPersistent) Description A ScreenTip window is split into three sections – header, description, and footer.
These sections are represented by TdxCustomScreenTipBand descendants – TdxScreenTipBand and TdxScreenTipFooterBand. The TdxCustomScreenTipBand class provides an interface common to sections:
l Glyph and GlyphFixedWidth – specify an explanatory image and its width options. l Text property – specifies a descriptive text. l TextAlign property – specifies the horizontal alignment of text in the section.
Additionally, the Font property is provided to identify font options that are currently applied to a descriptive text in a particular section. Do not use the TdxCustomScreenTipBand class directly. Use its descendants instead.
Page 69 of 938
TdxCustomScreenTipLink Object Hierarchy Properties The base class for ScreenTip links that map ScreenTips to associated objects. Unit dxScreenTip TdxCustomScreenTipLink = class(TCollectionItem) Description This class extends its ancestor with the ScreenTip property that references a ScreenTip used to map to an associated object. The following classes inherit from TdxCustomScreenTipLink to provide settings for object-specific ScreenTip links:
l TdxScreenTipLink. Establishes a link between a ScreenTip and a hinted control; l TdxScreenTipActionLink. Establishes a link between a ScreenTip and an action assigned to one or more hinted controls.
Page 70 of 938
TdxCustomScreenTipLinks Object Hierarchy Properties The base class for collections of ScreenTip links. Unit dxScreenTip TdxCustomScreenTipLinks = class(TCollection) Description This class extends its ancestor with the ScreenTipStyle property that references the ScreenTip style settings applied to the links contained within the collection. The following classes inherit from TdxCustomScreenTipLinks to provide settings for specific ScreenTip links:
l TdxScreenTipLinks. Contains links established between ScreenTips and hinted controls; l TdxScreenTipActionLinks. Contains links established between ScreenTips and actions assigned to hinted controls.
Page 71 of 938
TdxFader Object Hierarchy Properties Represents an object that controls fading animation effects within an application. Unit dxFading TdxFader = class(TObject);
Description This class introduces properties that allow you to:
l Enable or disable fading animation effects within an application (State). l Limit the number of animations to be played at one time (MaxAnimationCount).
To access the TdxFader object within an application, use the dxFader function. Use the dxFadeInDefaultAnimationFrameCount, dxFadeInDefaultAnimationFrameDelay, dxFadeOutDefaultAnimationFrameCount, and dxFadeOutDefaultAnimationFrameDelay global constants to customize the animation speed and smoothness.
Page 72 of 938
TdxFadingOptions Object Hierarchy Properties Contains a UI element’s fading animation settings. Unit dxFading TdxFadingOptions = class(TPersistent) Description This class provides properties that allow you to specify the fade-in and fade-out animation effect settings of a UI element. A TdxFadingOptions object is referenced by the Ribbon control’s OptionsFading option sets.
Page 73 of 938
TdxGallery Object Hierarchy Properties Methods Describes the gallery structure. Unit dxGallery TdxGallery = class(TdxCustomGallery) Description In most cases, you will not need to use this class directly. Use the descendant TdxGalleryControlStructure class instead. It is available via the TdxGalleryControl.Gallery property.
Page 74 of 938
TdxGalleryGroup Object Hierarchy Properties Methods A group in a TdxGalleryGroups collection. Unit dxGallery TdxGalleryGroup = class(TcxComponentCollectionItem) Description The TdxGalleryGroup class introduces the Items property that specifies the group’s items. TdxGalleryGroup serves as the base class for TdxGalleryControlGroup.
Page 75 of 938
TdxGalleryGroups Object Hierarchy Properties Methods The collection of groups within the TdxGalleryControlStructure class. Unit dxGallery TdxGalleryGroups = class(TcxComponentCollection) Description A gallery is comprised of groups - visual elements that display captions and child item collections. Groups are represented by TdxGalleryControlGroup objects derived from TdxGalleryGroup. You can access a collection of groups via the TdxGalleryControlStructure.Groups property that exposes the TdxGalleryControlGroups class derived from TdxGalleryGroups. TdxGalleryGroups serves as the base class for TdxGalleryControlGroups.
Page 76 of 938
TdxGalleryItem Object Hierarchy Properties Methods Serves as the base class for TdxGalleryControlItem. Unit dxGallery TdxGalleryItem = class(TdxCustomGalleryItem) Description This class extends its ancestor class with the Checked property that specifies the item’s checked state. End-users can click the item to switch its checked state. TdxGalleryItem objects are stored as TdxGalleryItems collection items.
Page 77 of 938
TdxGalleryItems Object Hierarchy Properties Methods A collection of items in the TdxGalleryControl class. Unit dxGallery TdxGalleryItems = class(TdxCustomGalleryItems) Description A gallery consists of groups and their child items. Each gallery group stores a collection of items that can be accessed via the TdxGalleryGroup.Items property. TdxGalleryItems serves as the base class for TdxGalleryControlItems
Page 78 of 938
TdxGIFImage Object Hierarchy Properties Methods A GIF format. Unit dxGDIPlusClasses TdxGIFImage = class(TdxSmartImage) Description This type is used indirectly. Use the TdxSmartImage, as a generic type to allow automatic type cast when processing the image.
Page 79 of 938
TdxGPBrush Object Hierarchy Properties Methods An advanced brush used to paint on a drawing surface (also called a canvas). Unit dxGDIPlusClasses TdxGPBrush = class(TdxGPCustomBrush) Description This class implements the advanced brush with transparency, texture, and gradient fill support. A TdxGPBrush object can be used to paint various surfaces composing complex shapes:
The brush layout area always matches the bounding rectangle of the painted shape (or surface). When a surface is painted, the actual shape of the displayed element is applied to the brush layout as a mask (i.e., limits the visible portion of the brush layout):
The TdxGPBrush class extends its ancestor class with the following members, allowing you to:
l Select one of the brush painting modes (the Style property); l Assign the TdxAlphaColor value used to paint the brush in the solid fill mode (the Color property); l Set the image and accompanying properties for the texture fill mode (the Texture property); l Manage the list of key gradient points for the gradient fill mode (the GradientPoints property); l Select one of the available directions of the line on which the key gradient points are located (the GradientMode property;
like with the GradientPoints property, its value is taken into account only in the gradient fill mode); l Identify whether the brush is actually displayed (the IsEmpty property).
A TdxGPBrush object is referenced by:
l The Brush property implemented in the TdxGPPen class; l The Brush property implemented in the TdxSpreadSheetShape class.
Page 80 of 938
TdxGPBrushGradientPoints Object Hierarchy Properties A set of key gradient points arranged in a brush area. Unit dxGDIPlusClasses TdxGPBrushGradientPoints = class(TdxGpBase) Description This class implements a gradient line with a set of the key points located on it. The straight gradient line crosses the brush area in a specific manner determined by the positions of the starting and ending points on the brush’s border area.
The actual positions of starting and ending points of the gradient line and, thus, its direction within the painted region, are determined by the GradientMode property implemented in the TdxGPBrush class. The TdxGPBrushGradientPoints class extends its ancestor class with the following members, allowing you to:
l Access the TdxAlphaColor color values of individual key gradient points by their zero-based indexes (the Colors property); l Access the positions of the key points on the gradient line by their zero-based indexes (the Offsets property); l Identify the current number of key gradient points on the line (the Count property); l Set the top limit for the total number of key points on the gradient line (the Capacity property); l Remove the specified key points from the gradient line (the Delete procedure); l Clear the gradient line from all previously created key points (the Clear procedure); l Invert the position order of all key points on the gradient line (the InvertOrder procedure).
The TdxGPBrushGradientPoints object is referenced by the GradientPoints property implemented in the TdxGPBrush class.
Page 81 of 938
TdxGPCustomBrush Object Hierarchy Properties Methods The base class for the Brush used for painting shapes and surfaces. Unit dxGDIPlusClasses TdxGPCustomBrush = class(TdxGPCustomGraphicObject) Description The TdxGPCustomBrush class implements all the basic functionality required by the advanced painting brushes.
Page 82 of 938
TdxGPPen Object Hierarchy Properties Methods An advanced line graphic object. Unit dxGDIPlusClasses TdxGPPen = class(TdxGPCustomGraphicObject) Description This class implements graphical line objects with customizable pattern, width, and painting styles. The TdxGPPen lines can be used to paint complex shapes with transparency and gradient support:
The brush layout area of the TdxGPPen line matches its bounding rectangle. The final shape of the line object is applied to the brush layout as a mask (i.e., limits the visible portion of the brush layout):
The TdxGPPen class extends its ancestor class with the following members, allowing you to:
l Set the line’s absolute width (the Width property); l Assign the line pattern (the Style property); l Set the parameters of the brush used to paint the line pattern (the Brush property); l Identify whether the line is actually painted (the IsEmpty property).
The TdxGPPen object is referenced by the Pen property implemented in the TdxSpreadSheetShape class.
Page 83 of 938
TdxJPEGImage Object Hierarchy Properties Methods A JPEG format. Unit dxGDIPlusClasses TdxJPEGImage = class(TdxSmartImage) Description This type is used indirectly. Use the TdxSmartImage, as a generic type to allow automatic type cast when processing the image.
Page 84 of 938
TdxPNGImage Object Hierarchy Properties Methods A PNG format. Unit dxGDIPlusClasses TdxPNGImage = class(TdxSmartImage) Description This type is used indirectly. Use the TdxSmartImage, as a generic type to allow automatic type cast when processing the image.
Page 85 of 938
TdxScreenTip Object Hierarchy Properties Methods A ScreenTip. Unit dxScreenTip TdxScreenTip = class(TcxComponentCollectionItem) Description An enhanced ScreenTip contains three sections – header, description, and footer.
Each section can display an explanatory image and/or a descriptive text (see the section’s Glyph and Text properties, respectively). You can display a common footer across a number of different ScreenTips. To accomplish this, specify the footer information via the ScreenTip repository’s StandardFooter property and set the UseStandardFooter property to True in specific ScreenTips. If there are no specific details to be shown in the ScreenTip’s header, set the ScreenTip’s UseHintAsHeader property to True to display a hint in this section specified by the control’s Hint property. To customize the width of the ScreenTip’s window, use the ScreenTip’s Width property. From the ScreenTip instance you can access other ScreenTips via the ScreenTip’s Collection property.
Page 86 of 938
TdxScreenTipActionLink Object Hierarchy Properties A link between a ScreenTip and an action assigned to one or more hinted controls. Unit dxScreenTip TdxScreenTipActionLink = class(TdxCustomScreenTipLink) Description This class extends its ancestor class with the Action property to allow you to map the action assigned to one or more hinted controls with the ScreenTip referenced by the ScreenTip property. TdxScreenTipActionLink objects are elements of the link collection referenced by the ScreenTip style’s ScreenTipActionLinks property.
Page 87 of 938
TdxScreenTipActionLinks Object Hierarchy Properties Methods A collection of links established between ScreenTips and actions assigned to hinted controls. Unit dxScreenTip TdxScreenTipActionLinks = class(TdxCustomScreenTipLinks) Description A collection element is a TdxScreenTipActionLink object that references a hinted control and a ScreenTip using the Control and ScreenTip properties. The TdxScreenTipActionLinks object is referenced by the ScreenTip style’s ScreenTipActionLinks property.
Page 88 of 938
TdxScreenTipBand Object Hierarchy Properties See Also A section in a ScreenTip window. Unit dxScreenTip TdxScreenTipBand = class(TdxCustomScreenTipBand) Description A ScreenTip window is split into three sections – header, description, and footer.
Each section is represented by a TdxScreenTipBand class instance. With TdxScreenTipBand properties, you can specify the following for each section:
l An explanatory image (see the Glyph property). l A descriptive text (see the Text property).
You can also specify the horizontal alignment of text in the section (see the TextAlign property). Note: to specify common footer information for a number of ScreenTips, use the ScreenTip repository’s StandardFooter property instead of the ScreenTip’s Footer property to avoid replication. To specify which ScreenTip displays this information, toggle the UseStandardFooter property of the specific ScreenTip.
Page 89 of 938
TdxScreenTipCollection Object Hierarchy Properties Methods A ScreenTip collection. Unit dxScreenTip TdxScreenTipCollection = class(TcxComponentCollection) Description This class extends its ancestor class with members that allow you to:
l Add a ScreenTip to the collection (Add); l Access individual ScreenTips contained within the collection (Items); l Access the ScreenTip repository that owns the collection (Repository).
A TdxScreenTipCollection object is referenced by the Items property of a ScreenTip repository. Refer to the property description to learn how to invoke a design-time collection editor.
Page 90 of 938
TdxScreenTipLink Object Hierarchy Properties A link between a hinted control and an associated ScreenTip. Unit dxScreenTip TdxScreenTipLink = class(TdxCustomScreenTipLink) Description This class extends its ancestor class with the Control property to allow you to map a hinted control with a ScreenTip referenced by the ScreenTip property. TdxScreenTipLink objects are elements of the link collection referenced by the ScreenTip style’s ScreenTipLinks property.
Page 91 of 938
TdxScreenTipLinks Object Hierarchy Properties Methods A collection of links established between hinted controls and associated ScreenTips. Unit dxScreenTip TdxScreenTipLinks = class(TdxCustomScreenTipLinks) Description A collection element is a TdxScreenTipLink object that references a hinted control and a ScreenTip with the Control and ScreenTip properties, respectively. The TdxScreenTipLinks object is referenced by the ScreenTip style’s ScreenTipLinks property.
Page 92 of 938
TdxScreenTipStyle Object Hierarchy Properties Contains style settings for ScreenTips controlled by the TcxHintStyleController component. Unit dxScreenTip TdxScreenTipStyle = class(TcxCustomHintStyle) Description This class extends its ancestor class with the collection properties that allow you to:
l Link ScreenTips with actions assigned to one or more hinted controls (ScreenTipActionLinks); l Link ScreenTips directly with hinted controls (ScreenTipLinks).
At runtime, the TcxHintStyleController component uses the links you provided using these collection properties to associate ScreenTips with certain hinted controls. The TdxScreenTipStyle object is referenced by the hint style controller’s HintStyle property.
Page 93 of 938
TdxSmartImage Object Hierarchy Properties Methods See Also A universal image format. Unit dxGDIPlusClasses TdxSmartImage = class(TdxGPImage) Description This type is used as a generic to automatically determine the actual image format, when processing the image.
Page 94 of 938
TdxTIFFImage Object Hierarchy Properties Methods A TIFF format. Unit dxGDIPlusClasses TdxTIFFImage = class(TdxSmartImage) Description This type is used indirectly. Use the TdxSmartImage, as a generic type to allow automatic type cast when processing the image.
Page 95 of 938
TcxImageCollection Object Hierarchy Properties Methods See Also Implements a collection capable of storing images of different formats and sizes. Unit cxGraphics TcxImageCollection = class(TComponent) Description This component uses the TPicture type (see the collection item’s Picture property) in order to store images of different formats and sizes. You can perform the following operations with the TcxImageCollection component:
l Paint the stored images using the collection’s Draw overloads. When drawing, you can apply image sizing and antialiasing.
l Dynamically synchronize the state of the control (that uses images in the image collection) with the collection’s state using a notification mechanism (see the AddListener and RemoveListener methods, and the IcxImageCollectionListener interface).
Images can be added to the component in the following ways:
l In code – via the component’s Items collection property. l At design time – Click "Add Images…" in the component’s context menu to invoke the Open File dialog and select one or
more image files in the dialog. Click "Add Images from Icon Library…" to invoke the Image Picker dialog, which allows you to load images from the DevExpress Icon Library. Any of these methods automatically create collection items and load images to them from the selected files. Alternatively, you can invoke the standard collection editor for the Items collection property, add collection elements one by one, and load images to them via an element’s Picture property. To invoke the collection editor, do one of the following:
¡ Double-click the TcxImageCollection component; ¡ Click Edit… in the component’s context menu; ¡ Click the ellipsis button next to the Items collection property.
Page 96 of 938
TcxImageList Object Hierarchy Properties Methods Events See Also An enhanced image list control. Unit cxGraphics TcxImageList = class(TDragImageList)
Description Unlike the standard TImageList, TcxImageList allows you to store 32-bit images (including PNG images) and paint them using alpha blending. In addition to the settings inherited from the base TDragImageList class, the TcxImageList class introduces members that allow you to:
l Specify whether the alpha channel information is used to draw stored images (AlphaBlending). l Improve performance by postponing sending notifications of image list changes (BeginUpdate, CancelUpdate, and
EndUpdate). l Paint stored images using various image adjustment options (Draw). l Copy stored images to another image list (CopyImages). l Retrieve image and transparency mask bitmaps of stored images (GetImage, GetImageInfo, and GetMask).
At design time, TcxImageList allows you to easily retrieve the dimensions of images (the Height and Width properties) and load images from any image list (a TCustomImageList descendant) on a form. To do this, click ‘Assign From’ in the component’s context menu and select the desired list image. Note that prior to loading images from the selected image list, TcxImageList clears its contents. TcxImageList also provides a design-time editor, which allows you to load images into the image list, convert them to 32-bit images to improve painting performance, manage stored images within the list, and export them into files. Refer to the Using the Image List Editor topic, to learn more about this editor. Note: To retrieve bitmaps of 32-bit images stored in TcxImageList, call the GetImage or GetImageInfo method, instead of the GetBitmap method. Important Note: Image lists depend on Comctl32.dll. Make sure you have the latest version of this file installed to avoid problems displaying images.
Page 97 of 938
TcxLocalizer Object Hierarchy Properties Methods Events The localization component. Unit cxLocalization TcxLocalizer = class(TComponent) Description Use the TcxLocalizer component to create localized applications. To learn how to translate applications with the TcxLocalizer, refer to the How To Localize an Application Using the TcxLocalizer help topic.
Page 98 of 938
TcxLookAndFeelController Object Hierarchy Properties Methods Represents a component providing a convenient way to manipulate common look and feel settings for all DevExpress controls (TcxControl descendants) at design time. Unit cxLookAndFeels TcxLookAndFeelController = class(TComponent, IcxLookAndFeelNotificationListener)
Description The default look and feel of any TcxControl descendant is determined by the root look and feel and Touch mode settings. The root look and feel is a TcxLookAndFeel class instance that is created on application startup. You can access it at runtime via the RootLookAndFeel global function. The default values of the root look & feel’s Kind, NativeStyle, and SkinName properties are specified by the cxDefaultLookAndFeelKind, cxDefaultLookAndFeelNativeStyle, and cxDefaultLookAndFeelSkinName global constants, respectively. To customize the root look and feel or Touch mode settings at design time, use the TcxLookAndFeelController or TdxSkinController component. Drop any of these components onto a form and access the required settings via the component’s Kind, NativeStyle, SkinName, and TouchMode properties in the Object Inspector. To programmatically revert these settings to default values, call the component’s Reset method. Call the BeginUpdate and EndUpdate methods to improve performance when you are sequentially changing the Kind, NativeStyle, or SkinName property. Unlike the TcxLookAndFeelController, the TdxSkinController allows you to apply skins both to forms and any DevExpress controls on them. TcxControl descendants allow you to set their own look and feel. The control’s own look and feel is also a TcxLookAndFeel class instance that can be accessed via the control’s LookAndFeel property.
Page 99 of 938
TcxPropertiesStore Object Hierarchy Properties Methods Example See Also Represents a TcxPropertiesStore component. Unit cxPropertiesStore TcxPropertiesStore = class(TcxCustomPropertiesStore)
Description The TcxPropertiesStore component is used to save and restore component-specific information to a storage of a specific type. It allows you to store/restore required published properties of selected components on the form containing the PropertiesStore component. The PropertiesStore component provides a design-time editor to choose components and their properties to save/restore using the storage.
The TcxPropertiesStore supports the following storage types: registry, INI file and stream. To enable the TcxPropertiesStore object:
1. Place a TcxPropertiesStore component on a form. 2. Specify the components and their properties to be stored/restored using the storage. 3. Specify the storage name and type via the StorageName and StorageType properties.
When the form is opened, TcxPropertiesStore attempts to read settings of the selected components from the storage. If the
Page 100 of 938
storage exists, its property settings replace the settings of existing components. When the form is destroyed, the storage is recreated and properties of the selected components are saved. Disable this automatic functionality by setting its Active property to False. Manual operation is also available by calling the StoreTo and RestoreFrom methods to store/restore selected component settings to the current storage at any time. The TcxPropertiesStore allows the saving and restoring of properties at design time. The storage for design time saving/restoring is identified by the StorageName and StorageType properties. Refer to the TcxCustomPropertiesStore description for information on property types that can be stored/restored.
Page 101 of 938
TcxStyleRepository Object Hierarchy Properties Methods See Also Represents an object managing collections of styles and style sheets. Unit cxStyles TcxStyleRepository = class(TComponent);
Description A style repository represents organized storage of styles applicable to Developer Express controls supporting Styles technology. The TcxStyleRepository class allows you to create, store and access individual styles where each is presented by the TcxCustomStyle class (or its descendant). TcxCustomStyle is an abstract class. Use the TcxStyle class to create items in a repository. Most Developer Express controls supporting Styles technology declare a Styles member. This supports a collection of style properties defining the appearance of particular control elements. Usually you have to create a style, initialize its attributes as appropriate and assign the style to the control’s style property. Using style sheets is another way of initializing style properties of a control element. A specific style sheet represents a set of styles suitable for a particular control (for instance, a TcxGridTableViewStyleSheet class specify styles for a grid view). Instead of specifying individual styles for a control element, you can assign it a style sheet thus specifying values for all style properties. To assign a style sheet to a control element, use its Styles.StyleSheet property. You can create a style sheet programmatically using the CreateStyleSheet method. All style sheets are supported by the StyleSheets property. The style repository editor provides you a convenient way to manipulate styles and style sheets at design time. The next image demonstrates the Style Sheets tab of the style repository editor:
Page 102 of 938
TdxScreenTipRepository Object Hierarchy Properties A ScreenTip repository. Unit dxScreenTip TdxScreenTipRepository = class(TComponent) Description A ScreenTip repository is a component used for storing information on control ScreenTips. It stores the ScreenTip collection (see the repository’s Items property) and provides the following ScreenTip-specific settings:
l DescriptionFont property – specifies font settings for a descriptive text displayed in the ScreenTip window’s description section.
l FooterFont property – specifies font settings for a descriptive text displayed in the ScreenTip window’s footer section. l HeaderFont property – specifies font settings for a descriptive text displayed in the ScreenTip window’s header section. l AssignedFonts property – activates font settings specified by the above properties. l ShowDescription property – specifies whether to show an enhanced ScreenTip. l StandardFooter property – provides settings for a ScreenTip window’s footer section common to a number of ScreenTips.
The TdxScreenTipRepository component provides a design-time editor that allows you to manage ScreenTips and customize them as required. Refer to the Items property description to learn how to invoke this editor.
Page 103 of 938
Note: Ribbon UI elements provide built-in support for ScreenTips created with the TdxScreenTipRepository component. All other VCL controls (TControl descendants) require that you add a TcxHintStyleController component to a form, switch the component’s HintStyle property to use TdxScreenTipStyle and perform the following to enable ScreenTips for them:
l For toolbar items residing on traditional toolbars shipped with the ExpressBars Suite, set a bar manager’s UseBarHintWindow property to False and associate individual toolbar items with ScreenTips using an item’s ScreenTip property;
l For all other controls, associate them with corresponding ScreenTips using the TcxHintStyleController component’s HintStyle.ScreenTipLinks and HintStyle.ScreenTipActionLinks collections.
Page 104 of 938
TcxScrollBar Object Hierarchy Properties Methods Events A scrollbar. Unit cxScrollBar TcxScrollBar = class(TCustomControl, IdxSkinSupport);
Description TcxScrollBar offers the same functionality as the standard VCL scrollbar and in addition, provides support for skins from the ExpressSkins Library.
TcxScrollBar provides an API that allows you to customize the following scrollbar appearance and behavior options:
l Look and feel settings (LookAndFeel); l Bar orientation (Kind); l Scrollable range (Min and Max); l Thumb position and size (Position, PageSize, and OnScroll); l Scrolling parameters (SmallChange, LargeChange, UnlimitedTracking, and SetScrollParams).
Page 105 of 938
TcxContainer Object Hierarchy Properties Methods Events See Also Represents a class that clips child windowed controls within a specified region. Unit cxContainer TcxContainer = class(TcxControl, IcxMouseTrackingCaller);
Description This class is the base class for TcxCustomEdit which provide the base functionality for ExpressEditors. The TcxContainer class implements the clipping of a windowed control. When placing child windowed controls onto the client region of a TcxContainer, only the region defined by the client rectangle is painted. The TcxContainer class introduces the style attributes (see the Style, StyleDisabled, StyleFocused and StyleHot properties) which control the appearance of the container control in various states such as normal, disabled, focused and hot-tracked (highlighted), respectively. The TcxContainer class provides the RestoreStyles method to restore the default style attributes’ values for a container control. A custom editor has to implement the IcxContainerInnerControl interface in order to provide a link to the container control associated with it (see the GetcxContainer function).
Page 106 of 938
TcxControl Object Hierarchy Properties Methods Events The TcxControl object is the base class designed by Developer Express Inc. for its cross-platform windowed controls. Unit cxControls TcxControl = class(TCustomControl);
Description The TcxControl object is used to create native cross-platform windowed controls that do not correspond to standard Windows components. The TcxControl object is the common ancestor for all native cross-platform windowed controls. As a direct descendant of the TCustomControl class, the TcxControl object provides the ActiveCanvas and Canvas properties to simplify native control drawing and to manage the drawing surface. These properties provide access to a TcxCanvas object representing a drawing surface for cross-platform windowed controls.
Page 107 of 938
TcxControlChildComponent Object Hierarchy Properties Methods Represents a child component of a control. Unit cxControls TcxControlChildComponent = class(TComponent);
Description The TcxControlChildComponent represents a base class for a child component of a control (for instance, grid views in the ExpressQuantumGrid4 control). The parent control is passed as a parameter in the constructor.
Page 108 of 938
CheckDay Function Returns the valid day for a specific date. Unit cxDateUtils function CheckDay(AYear, AMonth, ADay: Integer): Integer;
Description The CheckDay function returns the valid day for the date defined by the AYear, AMonth and ADay parameters. If the ADay parameter is less than 1, the function returns the first day of the month, i.e. 1. If it is greater than the total number of days in a given month and year, CheckDay returns the last day of the month. Otherwise, the ADay parameter is a valid day returned by the function.
Page 109 of 938
cxContainerMaxBorderWidth global constant Specifies the maximum width of the container control’s border. Unit cxLookAndFeelPainters cxContainerMaxBorderWidth = 2;
Page 110 of 938
cxContainerShadowWidth global constant Specifies the width of the shadow painted for container controls. Unit cxContainer cxContainerShadowWidth = 3;
Description Container controls (for instance, the TcxListBox control) use the TcxContainerStyle object to control their appearance. This object’s Shadow property specifies whether the shadow is displayed. The width of the shadow is specified by the cxContainerShadowWidth global constant which is equal to 3 by default.
Page 111 of 938
cxDefaultAutoCompleteDelay global constant Specifies the time interval (in milliseconds) during which any additional key presses that are made will be treated as an addition to the filter string used in the incremental search. Unit cxContainer cxDefaultAutoCompleteDelay = 500;
Description The cxDefaultAutoCompleteDelay global constant is used by the container controls which support incremental search (for instance, the TcxListBox, TcxCheckListBox, and TcxMCListBox controls) to specify the time interval during which any additional key presses that are made will be treated as an addition to the filter string used in the incremental search. When the number of milliseconds specified by cxDefaultAutoCompleteDelay has passed, the filter string is reset so that it consists only of the last key pressed. The default value of the cxDefaultAutoCompleteDelay global constant is equal to 500 (which means a half second delay).
Page 112 of 938
cxDefaultIsTouchModeEnabled global constant Determines the default value of the TcxLookAndFeelController.TouchMode property. Unit cxLookAndFeels cxDefaultIsTouchModeEnabled = False;
Page 113 of 938
cxDefaultLookAndFeelKind global constant Determines the default value of the Kind property for all look and feel classes. Unit cxLookAndFeels cxDefaultLookAndFeelKind = lfUltraFlat;
Page 114 of 938
cxDefaultLookAndFeelNativeStyle global constant Determines the default value of the NativeStyle property for all look and feel classes. Unit cxLookAndFeels cxDefaultLookAndFeelNativeStyle = False;
Page 115 of 938
cxDefaultLookAndFeelSkinName global constant Determines the default value of the SkinName property for all look and feel classes. Unit cxLookAndFeels cxDefaultLookAndFeelSkinName = '';
Page 116 of 938
cxDialogsMetricsStore Function See Also Instantiates a TcxDialogsMetricsStore object that stores a dialog’s settings. Unit cxClasses Declaration function cxDialogsMetricsStore: TcxDialogsMetricsStore; Description The cxDialogsMetricsStore routine returns a reference to the TcxDialogsMetricsStore instance.
Page 117 of 938
cxExportGraphicClass global constant Specifies which type of graphics class to use to generate the images, which are applied to the exported data. Unit cxExport cxExportGraphicClass : TGraphicClass = TBitmap; Description The Developer Express controls (such as TcxGrid and TcxTreeList) provide the means for exporting their data to various formats. To reflect the appearance of those controls in the exported formats different types of images are used. To minimize the storage requirement for the generated images the TMetafile or TJPEGImage types can be applied. Use the cxExportGraphicClass constant to specify the type of the graphics class that will be used to generate the images when the DX controls’ export routines are invoked. Note: When images are exported from Developer Express controls (such as TcxGrid and TcxTreeList) exported duplicate image files will not be created, ensuring you have the optimal (compact) output file size.
Page 118 of 938
cxGetDateFormat Function Converts the ADate date into a date string. Unit cxDateUtils function cxGetDateFormat(ADate: TDateTime; out AFormatDate: string; AFlags: Integer; AFormat: string = ''): Boolean; Description Use the cxGetDateFormat function to convert the ADate date into the AFormatDate format string. This function uses the system API to obtain the format string. The cxGetDateFormat function returns a value of True if the host environment supports this operations. The ADate parameter specifies the date to be converted into the AFormatDate string. The AFormatDate parameter provides the resulting string which is formatted in accordance with the AFormat date format (if specified) or with the date format of the default user locale. The AFlags parameter specifies the function’s options. This parameter should be set to 0 if the AFormat parameter is specified. The table below lists the available options:
The AFormat parameter specifies the date format. If the AFormat parameter is set to an empty string, then the date format of the default locale is used. The following elements are used to construct the date format:
Value Meaning
LOCALE_NOUSEROVERRIDE If set, the function formats the string using the system default date format for the specified locale. If not set, the function formats the string using any user overrides to the locale's default date format
LOCALE_USE_CP_ACP Uses the system ANSI code page for string translation instead of the locale's code page
DATE_SHORTDATE Uses the short date format. This is the default. This value cannot be used with DATE_LONGDATE or DATE_YEARMONTH.
DATE_LONGDATE Uses the long date format. This value cannot be used with DATE_SHORTDATE or DATE_YEARMONTH
DATE_YEARMONTH Uses the year/month format. This value cannot be used with DATE_SHORTDATE or DATE_LONGDATE
DATE_USE_ALT_CALENDAR Uses the alternate calendar (if present) to format the date string. If this flag is set, the function uses the default format for the alternate calendar, rather than any user overrides. The user overrides will be used only in the event that there is no default format for the specified alternate calendar
DATE_LTRREADING Adds marks for left-to-right layout. This value cannot be used with DATE_RTLREADING
DATE_RTLREADING Adds marks for right-to-left layout. This value cannot be used with DATE_LTRREADING
Value Meaning
d Day of month as digits without a leading zero for single-digit days
dd Day of month as digits with leading zero for single-digit days
Page 119 of 938
ddd Day of week as a three-letter abbreviation
dddd Day of week as its full name
M Month as digits without a leading zero for single-digit months
MM Month as digits with leading zero for single-digit months
MMM Month as a three-letter abbreviation
MMMM Month as its full name
y Year as last two digits, but without a leading zero for years less than 10
yy Year as last two digits, but with leading zero for years less than 10
yyy Year represented by full four digits
gg Period/era string. This element is ignored if the date to be formatted does not have an associated era or period string
Page 120 of 938
cxGetResourceString Function See Also Retrieves a resource string for the specified resource identifier. Unit dxCore type
TcxResourceStringID = Pointer; function cxGetResourceString(const ResString: TcxResourceStringID): string;
Description The cxGetResourceString function retrieves a resource string for the resource identifier specified by the ResString parameter. You pass the address of the resource string as the identifier String constants for Express products are stored as resources. The cxGetResourceString function is used internally to retrieve strings for specific control elements. For instance, a date editor determines the caption to be displayed on the Clear button within the dropdown calendar by reading the value of the cxSDatePopupClear resource string as follows: cxGetResourceString(@cxSDatePopupClear); By default, it displays ‘Clear’. For the purpose of localization, you can change the resource strings depending on the language and the regional settings. To do so, call the cxSetResourceString procedure passing a resource identifier and the new value of the resource string as parameters. This procedure substitutes the value of the resource string during execution only. For instance, the following code specifies a new value for the cxSDatePopupClear resource string in the German language: //Delphi cxSetResourceString(@cxSDatePopupClear, 'Lцschen');
//C++ Builder cxSetResourceString(&_cxSDatePopupClear, "Lцschen");
Note: To easily localize applications that use standard, DevExpress or other third-party controls to any language supported by Windows, use the TcxLocalizer component.
Page 121 of 938
cxSetResourceString Procedure See Also Substitutes a value of the resource string retrieved by the cxGetResourceString function. Unit dxCore type
TcxResourceStringID = Pointer; procedure cxSetResourceString(const ResString: TcxResourceStringID; const Value: string);
Description String constants for Express products are stored as resources. The cxGetResourceString function is used internally to retrieve strings for specific control elements. You might use the cxSetResourceString procedure to substitute a value of a specific resource string during the program execution for localization purposes. Note that a new value does not replace a resource in an executable file. The ResString argument specifies a resource string identifier. You should pass an address of the resource string as the ResString parameter. A new value of the resource string is determined by Value. In the cxEditConsts unit, the cxSDatePopupClear resource string is declared. By default, it identifies the ‘Clear’ string displayed in a button within the dropdown calendar of the date editor. To display the German equivalent of the string, you can use the cxSetResourceString procedure. //Delphi cxSetResourceString(@cxSDatePopupClear, 'Lцschen');
//C++ Builder cxSetResourceString(&_cxSDatePopupClear, "Lцschen");
This code changes the caption of the Clear button for all date editors in the current application. Note: To easily localize applications that use standard, DevExpress or other third-party controls to any language supported by Windows, use the TcxLocalizer component.
Page 122 of 938
cxTouchElementMinSize global constant Specifies the minimum square size of a touchable element in Touch mode, in pixels. Unit cxLookAndFeelPainters cxTouchElementMinSize = 27; Description The default value of this constant corresponds to 7 millimeters on a 96 dpi display (the 7x7 millimeters area for interaction using a finger). You can adjust this value as required.
Page 123 of 938
DateOf Function Extracts the date from the TDateTime type. Unit cxDateUtils function DateOf(ADateTime: TDateTime): Integer;
Description Use the DateOf function to extract the date from the TDateTime type. It retrieves the integer part of the ADateTime parameter and this determines the number of days elapsed since 12/30/1899.
Page 124 of 938
DateTimeToText Function Converts a TDateTime value to a human readable string. Unit cxDateUtils function DateTimeToText(ADate: TDateTime): string;
Description Use the DateTimeToText function to convert the TDateTime type data to a human readable string. The ADate parameter represents the TDateTime type to convert. The conversion manner depends on the TcxFormatController.UseDelphiDateTimeFormats property value.
Page 125 of 938
DateTimeToTextEx Function Converts a TDateTime value to a string. Unit cxDateUtils function DateTimeToTextEx(const ADate: TDateTime; AIsMasked: Boolean): string;
Description The DateTimeToTextEx function converts a TDateTime value to a string. If the AIsMasked parameter is False, the function simply calls DateTimeToText, passes the ADate parameter to it and returns its result. If the AIsMasked parameter is True, the function performs the following steps:
1. Gets the global variable’s ShortDateFormat value. 2. Corrects it to use in masked editor mode.
3. Makes up the date format based on the previous two steps. 4. Formats the ADate parameter value according to the format made up. 5. Returns the formatted human readable string containing a value of the ADate parameter.
Page 126 of 938
DateToLongDateStr Function Converts the ADate date into a string formatted as a long date. Unit cxDateUtils function DateToLongDateStr(ADate: TDateTime): string; Description Use the DateToLongDateStr method to convert the ADate date into a string. The resulting string is formatted as a long date. For example, if the ADate parameter is set to 03/14/2005 and the long date format is dddd, MMMM dd, yyyy, then the resulting string will be ‘Monday, March 14, 2005’. The ADate parameter specifies the date to be converted into a string. Note: As for Windows NT/2000/XP the long date format of the default user locale is used (see the value in the registry subkey HKEY_CURRENT_USER\Control Panel\International\sLongDate). For other platforms the resulting string is formatted according to the long date format given by the Delphi LongDateFormat global variable.
Page 127 of 938
DaysPerMonth Function Returns the number of days in a month. Unit cxDateUtils function DaysPerMonth(AYear, AMonth: Integer): Integer;
Description Use the DaysPerMonth function to determine the number of days in a specific month of a specific year. The AYear and AMonth parameters specify the year and month respectively.
Page 128 of 938
dxChangeMonth Procedure Changes the date by a specified number of months. Unit cxDateUtils procedure dxChangeMonth(var AYear, AMonth: Word; Delta: Integer);
Description The AYear and AMonth parameters identify the date to be changed by a specified number of months. The Delta parameter can be either a positive or a negative value.
Page 129 of 938
dxDecMonth Procedure Decreases the specified date by one month. Unit cxDateUtils procedure dxDecMonth(var AYear, AMonth: Word);
Description Use the dxDecMonth procedure to decrease the date passed as the AMonth and AYear parameters by one month.
Page 130 of 938
dxEnableMultiThreading global constant Toggles the use of multi-threaded data processing within an application. Unit dxThreading dxEnableMultiThreading: Boolean = True;
Description Setting this constant to False completely disables the use of multi-threaded algorithms for data processing in an application, overriding any related settings that you set for individual controls or via the dxDefaultMultiThreadedFiltering and dxDefaultMultiThreadedSorting global constants.
Page 131 of 938
dxFadeInDefaultAnimationFrameCount global constant See Also Determines the default number of frames for a fade-in animation effect. Unit dxFading dxFadeInDefaultAnimationFrameCount: Integer = 4;
Description Possible values are 1 through 32.
Page 132 of 938
dxFadeInDefaultAnimationFrameDelay global constant See Also Determines the default frame delay (in milliseconds) for a fade-in animation effect. Unit dxFading dxFadeInDefaultAnimationFrameDelay: Integer = 15;
Description Possible values are 10 through 300.
Page 133 of 938
dxFadeOutDefaultAnimationFrameCount global constant See Also Determines the default number of frames for a fade-out animation effect. Unit dxFading dxFadeOutDefaultAnimationFrameCount: Integer = 12;
Description Possible values are 1 through 32.
Page 134 of 938
dxFadeOutDefaultAnimationFrameDelay global constant See Also Determines the default frame delay (in milliseconds) for a fade-out animation effect. Unit dxFading dxFadeOutDefaultAnimationFrameDelay: Integer = 20;
Description Possible values are 10 through 300.
Page 135 of 938
dxFader global function Provides access to an object that controls fading animation effects within an application. Unit dxFading function dxFader: TdxFader;
Description Refer to the TdxFader class description, to learn about available settings.
Page 136 of 938
dxGetDateElement Function Extracts the day, month or year form the TDateTime type. Unit cxDateUtils function dxGetDateElement(ADate: TDateTime; AElement: TcxDateElement): Integer;
Description This function extracts the day, month or year portion from the TDateTime type. The result is an integer representing the year, the number of a month or the number of days in a month. The ADateTime argument represents the date/time value from which to extract elements. The AElement argument determines the element to extract. See the description of the TcxDateElement type for the list of available elements.
Page 137 of 938
dxGetWeekNumber Function See Also Returns the week number in a year. Unit cxDateUtils function dxGetWeekNumber(ADate: TDateTime; AStartOfWeek: TDay; AFirstWeekOfYear: TcxFirstWeekOfYear): Integer; Description Use this function to determine the week number in a year. The ADate parameter specifies the date that the given week contains. The AStartOfWeek parameter specifies the day, which will be treated as the first day in each week. The AFirstWeekOfYear parameter specifies the week that should be considered as the first week of a year.
Page 138 of 938
dxIncMonth Procedure Increases the specified date by one month. Unit cxDateUtils procedure dxIncMonth(var AYear, AMonth: Word); overload;
Description Use the dxIncMonth procedure to increase the date passed as the AMonth and AYear parameters by one month.
Page 139 of 938
dxUseAntialiasingForRotatedText global constant Specifies whether or not the ClearType antialiasing is applied to a rotated text. Unit cxGraphics dxUseAntialiasingForRotatedText: Boolean = True; Description Set this variable to False to disable the ClearType antialiasing and eliminate text distortions reported in rare cases, for certain fonts. To paint a rotated text, call the TcxCanvas.DrawText method.
Page 140 of 938
GetcxContainer Function Obtains the container control for a particular control. Unit cxContainer Declaration function GetcxContainer(AControl: TWinControl): TcxContainer;
Description The GetcxContainer method obtains the container control of the TcxContainer type for the control specified by the AControl parameter. This function performs the appropriate cast for the TcxContainer descendant. If an object implements the IcxContainerInnerControl interface the function retrieves the container control via the IcxContainerInnerControl.ControlContainer property.
Page 141 of 938
GetDateRegularExpession Function See Also Returns a regular expression for editor internal date representation. Unit cxDateUtils function GetDateRegularExpession(const ADateFormat: string; AUseSmartInput: Boolean): string;
Description The GetDateEditMask function returns a mask for editor internal date representation. The result is a regular expression representing the current date format.
Page 142 of 938
IsLeapYear Function Determines whether the specified year is a leap year. Unit cxDateUtils function IsLeapYear(AYear: Integer): Boolean;
Description Use the IsLeapYear function to determine whether the year passed as an AYear parameter contains 365 or 366 days.
Page 143 of 938
LoadStyleSheetsFromIniFile Procedure See Also Loads style sheets from an INI file. Unit cxStyles type TcxCustomStyleSheetClass = class of TcxCustomStyleSheet; procedure LoadStyleSheetsFromIniFile(const AIniFileName: string; AStyleRepository: TcxStyleRepository; AStyleSheetClass: TcxCustomStyleSheetClass; const AStyleSheetNames: TStrings = nil; AOwner: TComponent = nil; const AStyleSheetList: TList = nil; AStyleGetName: TcxStyleGetName = nil); Description The LoadStyleSheetsFromIniFile method loads style sheets into a style repository determined by the AStyleRepository parameter from the INI file with the name specified by the AIniFileName parameter. The AStyleSheetClass parameter determines the class of style sheet(s) to create when loading from a file. Using the AStyleSheetNames parameter, you can specify the names of the style sheets to load. If it is set to nil, all style sheets are loaded from the file. Note: all style sheets created by the LoadStyleSheetsFromIniFile procedure will be the same class as defined by AStyleSheetClass. The INI file stores information on a style sheet in the following format: [Style Sheet Caption] Style1=Values Style2=Values ... If the class defined by AStyleSheetClass does not contain specific styles loaded from a particular section of the INI file, these styles are ignored. All other styles are used to set values for style properties of a new style sheet. You can use the AStyleSheetList parameter to add all loaded style sheets to an external list, but this is used at design time mainly. The AStyleGetName parameter is for internal use only.
Page 144 of 938
NullDate global constant Unit cxDateUtils NullDate = -700000;
Description Specifies the value for a date determined as not set.
Page 145 of 938
TimeOf Function Extracts time from the TDateTime type. Unit cxDateUtils function TimeOf(ADateTime: TDateTime): TDateTime;
Description Use the TimeOf function to extract time from the TDateTime type. The ADateTime argument represents the TDateTime type from which to extract time.
Page 146 of 938
SaveStyleSheetsToIniFile Procedure See Also Saves style sheets to an INI file. Unit cxStyles procedure SaveStyleSheetsToIniFile(const AIniFileName: string; const AList: TList); Description The SaveStyleSheetsToIniFile method saves the style sheet list specified by the AList parameter into the INI file with its name specified by the AIniFileName parameter. SaveStyleSheetsToIniFile saves only the caption of a style sheet and its assigned values. The class name of a style sheet is not saved.
Page 147 of 938
SmartTextToDate Function See Also Converts a string to the TDateTime type format. Unit cxDateUtils function SmartTextToDate(const AText: string; var ADate: TDateTime): Boolean;
Description Use the SmartTextToDate function to convert a string to the TDateTime type format. If conversion succeeds, the function returns True; otherwise, False. The strings that the SmartTextToDate function recognizes (also called smart input constants) are declared as resource strings in the cxLibraryStrs unit. For instance, for the ‘today’ string, the SmartTextToDate function retrieves the current date. Built-in smart input constants are stored in the scxDateEditSmartInput array. Each array element corresponds to a TcxDateEditSmartInput enumeration value, which you can use as an index with the scxDateEditSmartInput array in order to obtain the respective smart input constant. The following table lists all the built-in smart input constants.
* If the constant coincides with the current day of the week, the SmartTextToDate function returns the current date.
Smart Input Constant
Resource String Identifier
TcxDateEditSmartInput Equivalent
Description
'today' cxSDateToday deiToday Represents the current date.
'yesterday' cxSDateYesterday deiYesterday Represents yesterday’s date.
'tomorrow' cxSDateTomorrow deiTomorrow Represents tomorrow’s date.
'Sunday' cxSDateSunday deiSunday Represents the next Sunday date. *
'Monday’ cxSDateMonday deiMonday Represents the next Monday date. *
'Tuesday' cxSDateTuesday deiTuesday Represents the next Tuesday date. *
'Wednesday' cxSDateWednesday deiWednesday Represents the next Wednesday date. *
'Thursday' cxSDateThursday deiThursday Represents the next Thursday date. *
'Friday' cxSDateFriday deiFriday Represents the next Friday’s date. *
'Saturday' cxSDateSaturday deiSaturday Represents the next Saturday’s date. *
'first' cxSDateFirst deiFirst Represents the first day of the current week.
'second' cxSDateSecond deiSecond Represents the second day of the current week.
'third' cxSDateThird deiThird Represents the third day of the current week.
'fourth' cxSDateFourth deiFourth Represents the fourth day of the current week.
'fifth' cxSDateFifth deiFifth Represents the fifth day of the current week.
'sixth' cxSDateSixth deiSixth Represents the sixth day of the current week.
'seventh' cxSDateSeventh deiSeventh Represents the seventh day of the current week.
'bom' cxSDateBOM deiBOM Represents the first day of the current month.
'eom' cxSDateEOM deiEOM Represents the last day of the current month.
'now' cxSDateNow deiNow Represents the current date including the current time.
Page 148 of 938
Depending on your language you may want to use another strings to be recognized by the function. For this purpose, you can use the global cxSetResourceString procedure which replaces the resource string for the given identifier. A date editor gets a string, when it needs to display it, via the cxGetResourceString function. The function retrieves a resource string for the given identifier taking into account whether the string was substituted by cxSetResourceString. A date edit control allows a user to type specific strings instead of date values. These strings are interpreted then as corresponding dates. A date editor uses the SmartTextToDate function to convert the strings. The next code shows how to substitute the ‘today’ and ‘tomorrow’ strings acceptable by a date edit control for the German equivalents: // Delphi cxSetResourceString(@cxSDateToday, "Heute"); cxSetResourceString(@cxSDateTomorrow, "Morgen");
cxFormatController.GetFormats; cxFormatController.NotifyListeners; // C++ Builder
cxSetResourceString(&_cxSDateToday, "Heute"); cxSetResourceString(&_cxSDateTomorrow, "Morgen"); cxFormatController -> GetFormats(); cxFormatController -> NotifyListeners(); Now a date edit recognizes ‘Heute’ and ‘Morgen’ strings as today and tomorrow respectively. Calling to the SmartTextToDate function is performed by a date editor internally. After setting resource strings, you need to rebuild masks used by date editors. To do so, just call the GetFormats and NotifyListeners functions of the global format controller object. You can implement your own parser function (SmartTextToDateFunc constant) and use it to parse input via the SmartTextToDate function.
Page 149 of 938
SmartTextToDateFunc global constant See Also Specifies the function handle for the SmartTextToDate function. Unit cxDateUtils SmartTextToDateFunc: function(const AText: string; var ADate: TDateTime): Boolean = nil;
Page 150 of 938
StrToDateDef Function Tries to convert a string to the TDateTime type. Unit cxDateUtils function StrToDateDef(ADateStr: string; ADefDate: TDateTime): TDateTime;
Description The StrToDateDef function tries to convert a string to the TDateTime type. In case of a failure, it returns the ADefTime argument.
Page 151 of 938
TextToDateEx Function Converts a string to the TDateTime type. Unit cxDateUtils function TextToDateEx(AText: string; var ADate: TDateTime): Boolean;
Description This function first calls the SmartTextToDate function and passes the AText parameter to it. If the SmartTextToDate function fails, the format dependant conversion of the AText parameter occurs. If the conversion fails, the TextToDateEx function returns False. Otherwise, the converted value is passed as the ADate parameter and the function returns True.
Page 152 of 938
IcxContainerInnerControl Interface Properties Methods Unit cxContainer Description Every inner Developer Express control, which is placed in the TcxContainer control, has to implement the IcxContainerInnerControl interface to provide a link to its container via the ControlContainer property.
Page 153 of 938
IcxDialogMetricsInfoData Interface Hierarchy Methods See Also Allows a dialog to store custom settings when used with TcxDialogsMetricsStore. Unit cxClasses IcxDialogMetricsInfoData = interface(IUnknown) Description To persist custom dialog settings, a dialog class must implement the IcxDialogMetricsInfoData interface, so that TcxDialogMetricsInfo (which is used by the TcxDialogsMetricsStore) can save and restore the required custom information for a given dialog.
Page 154 of 938
IcxExportProgress Interface Hierarchy Methods See Also Allows you to respond to various events that are specific to export operations. Unit cxExport IcxExportProgress = interface(IUnknown) Description Objects that handle events that occur during export operations must implement the IcxExportProgress interface. These objects are passed as the AHandler parameter to export methods, including ExportGridTo~, cxExportPivotGridTo~, cxExportSchedulerTo~, cxExportTLTo~, and cxExportVGTo~. The current version of the interface provides the OnProgress method, which when implemented, enables you to track the progress of the export operation and abort it if necessary.
Page 155 of 938
IcxImageCollectionListener Interface Hierarchy Methods Allows a listener registered with the TcxImageCollection component to update itself when changes are made to the TcxImageCollection. Unit cxGraphics IcxImageCollectionListener = interface(IUnknown) Description The IcxImageCollectionListener interface is used to dynamically bind an interested listener to the TcxImageCollection component, in order to be notified of the TcxImageCollection modifications.
Page 156 of 938
IcxLookAndFeelNotificationListener Interface Hierarchy Methods Unit cxLookAndFeels IcxLookAndFeelNotificationListener = interface(IUnknown);
Description Every DevExpress control can export its look and feel to other DevExpress controls. The MasterLookAndFeel property of the TcxLookAndFeel class determines the imported look and feel of any DevExpress control. Any control, which imports the look and feel of the current control, is a listener. It listens to changes within the current control via the IcxLookAndFeelNotificationListener interface. Note that a control only listens to its MasterLookAndFeel property when its AssignedValues of the TcxLookAndFeel class property is not set. The IcxLookAndFeelNotificationListener interface listens for two events:
l Any look and feel property change via the MasterLookAndFeelChanged method. l The TcxLookAndFeel class instance destruction via the MasterLookAndFeelDestroying method.
Listener controls reflect all changes within the current control. If an imported TcxLookAndFeel class instance is destroyed, a listener control obtains its look and feel from the cxDefaultLookAndFeelKind, cxDefaultLookAndFeelNativeStyle, and cxDefaultLookAndFeelSkinName global constants.
Page 157 of 938
scxDateEditSmartInput global variable Stores built-in smart input constants. Unit cxDateUtils type TcxDateEditSmartInput = (deiToday, deiYesterday, deiTomorrow, deiSunday, deiMonday, deiTuesday, deiWednesday, deiThursday, deiFriday, deiSaturday, deiFirst, deiSecond, deiThird, deiFourth, deiFifth, deiSixth, deiSeventh, deiBOM, deiEOM, deiNow); scxDateEditSmartInput: array [TcxDateEditSmartInput] of string; Description Refer to the description of the SmartTextToDate function to learn about individual scxDateEditSmartInput array elements.
Page 158 of 938
TcxDateElement type Unit cxDateUtils type TcxDateElement = (deYear, deMonth, deDay); Description Determines the date element. This enumerator is used by the dxGetDateElement function.
Page 159 of 938
TcxBorder type Enumerates cell borders. Unit cxGraphics type TcxBorder = (bLeft, bTop, bRight, bBottom); Description Values include: Value Description
bLeft The left border.
bTop The top border.
bRight The right border.
bBottom The bottom border.
Page 160 of 938
TcxBorders type Specifies a set of cell borders. Unit cxGraphics type TcxBorder = (bLeft, bTop, bRight, bBottom); TcxBorders = set of TcxBorder; Description The TcxBorders is used to specify a set of cell borders. This type can contain any combination of TcxBorder values.
Page 161 of 938
TcxButtonState type Enumerates button states. Unit cxLookAndFeelPainters type TcxButtonState = (cxbsDefault, cxbsNormal, cxbsHot, cxbsPressed, cxbsDisabled); Description Values include: Value Meaning
cxbsDefault Normal (for the default buttons).
cxbsNormal Normal (for all other buttons).
cxbsHot Hot-tracked.
cxbsPressed Pressed.
cxbsDisabled Disabled.
Page 162 of 938
TcxCalcButtonKind type Enumerates calculator buttons types. Unit cxLookAndFeelPainters TcxCalcButtonKind = (cbBack, cbCancel, cbClear, cbMC, cbMR, cbMS, cbMP, cbNum0, cbNum1, cbNum2, cbNum3, cbNum4, cbNum5, cbNum6, cbNum7, cbNum8, cbNum9, cbSign, cbDecimal, cbDiv, cbMul, cbSub, cbAdd, cbSqrt, cbPercent, cbRev, cbEqual, cbNone); Description TcxCalcButtonKind enumerates the calculator button types. TcxCalcButtonKind is used in methods and events of the TcxCustomCalculator class to identify a specific button.
The following table describes the button types. Value Meaning Value Meaning
cbBack The 'Back' button. cbNum7 The '7' button.
cbCancel The 'CE' button. cbNum8 The '8' button.
cbClear The 'C' button. cbNum9 The '9' button.
cbMC The 'MC' button. cbSign The '+/-' button.
cbMR The 'MR' button. cbDecimal The ‘,’ button.
cbMS The 'MS' button. cbDiv The ‘/’ button.
cbMP The 'M+' button. cbMul The ‘*’ button.
cbNum0 The '0' button. cbSub The ‘-‘ button.
cbNum1 The '1' button. cbAdd The ‘+’ button.
cbNum2 The '2' button. cbSqrt The ‘sqrt’ button.
cbNum3 The '3' button. cbPercent The ‘%’ button.
cbNum4 The '4' button. cbRev The ‘1/x’ button.
cbNum5 The '5' button. cbEqual The ‘=’ button.
cbNum6 The '6' button. cbNone Does not identify any of calculator buttons.
Page 163 of 938
TcxCheckBoxState type Represents states for the TcxCustomCheckBox editor. Unit cxLookAndFeelPainters type
TcxCheckBoxState = (cbsUnchecked, cbsChecked, cbsGrayed); Description The TcxCheckBoxState class enumerates possible values for the check box state. The check box state is set via the TcxCustomCheckBox.State property, which affects the look & feel of the check box. The following table describes TcxCheckBoxState values (screenshots are made using standard and Windows XP look & feel): Value Meaning
cbsUnchecked The check box has no check mark, indicating that the user has not selected the option.
cbsChecked The check box has a check mark in it, indicating that the user has selected the option.
cbsGrayed The check box has a check mark in it, but it is grayed.
Page 164 of 938
TcxContainerBorderStyle type Specifies the border style of an associated container control. Unit cxLookAndFeelPainters TcxContainerBorderStyle = (cbsNone, cbsSingle, cbsThick, cbsFlat, cbs3D, cbsUltraFlat, cbsOffice11); Description Values include: Value Description Image
cbsNone No border is painted around the control.
cbsSingle A single-pixel border is painted around the control. Its color is specified by the BorderColor property.
cbsThick A thick border is painted around the control. Its color is specified by the BorderColor property.
cbsFlat A flat border is painted around the control.
cbs3D A 3D lowered border is painted around the control.
cbsUltraFlat An ultra flat border is painted around the control.
cbsOffice11 A border is painted around the control in the Office 2003 control style.
Page 165 of 938
TcxContainerStateItem type Specifies the state of the control. type
TcxContainerStateItem = (csNormal, csActive, csDisabled, csHotTrack); Description Represents the state of the control. The following table lists the possible states of a control. Value Meaning
csNormal The normal state of the control.
csActive The control is active, i.e. has focus.
csDisabled The control is disabled.
csHotTrack The control is highlighted, i.e. hot-tracked.
Page 166 of 938
TcxContainerStyleValue type Enumerates the flags that describe which control style attributes are assigned. Unit cxContainer TcxEditStyleValue = (csvBorderColor, csvBorderStyle, csvColor, csvEdges, csvFont, csvHotTrack, csvShadow, csvTextColor, csvTextStyle, csvTransparentBorder);
Description The TcxContainerStyleValue type enumerates the flags that indicate which control style attributes are assigned to the TcxCustomContainerStyle object. These flags are set via the TcxCustomContainerStyle.AssignedValues property. Value Meaning
csvBorderColor Indicates that the TcxCustomContainerStyle.BorderColor property is assigned a value.
csvBorderStyle Indicates that the TcxCustomContainerStyle.BorderStyle property is assigned a value.
csvColor Indicates that the TcxCustomContainerStyle.Color property is assigned a value.
csvEdges Indicates that the TcxCustomContainerStyle.Edges property is assigned a value.
csvFont Indicates that the TcxCustomContainerStyle.Font property is assigned a value.
csvHotTrack Indicates that the TcxCustomContainerStyle.HotTrack property is assigned a value.
csvShadow Indicates that the TcxCustomContainerStyle.Shadow property is assigned a value.
csvTextColor Indicates that the TcxCustomContainerStyle.TextColor property is assigned a value.
csvTextStyle Indicates that the TcxCustomContainerStyle.TextStyle property is assigned a value.
csvTransparentBorder Indicates that the TcxCustomContainerStyle.TransparentBorder property is assigned a value.
Page 167 of 938
TcxContainerStyleValues type Represents a set of flags indicating which container style attributes are assigned. Unit cxContainer TcxContainerStyleValues = set of TcxContainerStyleValue;
Description Each container control provides the Style, StyleDisabled, StyleFocused and StyleHot properties which present style attributes for various states of a control. The TcxCustomContainerStyle.AssignedValues member of the TcxContainerStyleValues type describes which style attributes are explicitly assigned to these style properties.
Page 168 of 938
TcxDateEditSmartInput type Enumerates built-in smart input constants. Unit cxDateUtils type TcxDateEditSmartInput = (deiToday, deiYesterday, deiTomorrow, deiSunday, deiMonday, deiTuesday, deiWednesday, deiThursday, deiFriday, deiSaturday, deiFirst, deiSecond, deiThird, deiFourth, deiFifth, deiSixth, deiSeventh, deiBOM, deiEOM, deiNow); Description TcxDateEditSmartInput values are used to enumerate smart input constants stored by the scxDateEditSmartInput array. Refer to the description of the SmartTextToDate function to learn about individual TcxDateEditSmartInput values.
Page 169 of 938
TcxEditPopupBorderStyle type Enumerates the styles of popup window borders. Unit cxLookAndFeelPainters TcxEditPopupBorderStyle = (epbsDefault, epbsSingle, epbsFrame3D, epbsFlat); Description Values include: Value Meaning
epbsDefault Popup borders are drawn in the manner in which editor borders are currently painted. That is determined by the TcxCustomEditStyle.BorderStyle and TcxCustomEditStyle.HotTrack properties of the editor with which the popup is associated.
epbsSingle Popup borders are thin. The following image displays the popup window with PopupBorderStyle set to epbsSingle.
epbsFrame3D Popup borders are three-dimensional.
The following image displays the popup window with PopupBorderStyle set to epbsFrame3D.
epbsFlat Popup borders are flat with a slight three-dimensional effect.
The following image displays the popup window with PopupBorderStyle set to epbsFlat.
Page 170 of 938
TcxFirstWeekOfYear type See Also Enumerates the available options that specify which week should be considered the first week of a year. Unit cxDateUtils type TcxFirstWeekOfYear = (fwySystem, fwyJan1, fwyFirstFullWeek, fwyFirstFourDays); Description All the possible values are described in the following table. Value Meaning
fwySystem The day of the week specified in the host environment settings as the first day of the week.
fwyJan1 The first week of the year starts on January 1.
fwyFirstFullWeek The first week with a complete set of working days in it.
fwyFirstFourDays The first week with four working days in it.
Page 171 of 938
TcxImageFitMode type Enumerates sizing options used for fitting an image into a specific area. Unit cxGraphics type TcxImageFitMode = (ifmNormal, ifmStretch, ifmProportionalStretch, ifmFit, ifmFill); Description Values include: Value Description
ifmNormal No image sizing. Large images (images that do not fit the area) will be partially displayed.
ifmStretch An image is stretched or compressed to fill the entire area, without maintaining the aspect ratio. The image may become disproportional.
ifmProportionalStretch An image is stretched or compressed to fit the area, maintaining the aspect ratio.
ifmFit If an image does not fit the area, it is compressed to fit the area, maintaining the aspect ratio. Otherwise, the image size remains unchanged.
ifmFill Similar to ifmProportionalStretch, but an image is scaled to fill the entire area. The image that does not fit the area is partially displayed, in order to maintain the aspect ratio.
Page 172 of 938
TcxImageIndex type An alias for the standard VCL TImageIndex type. Unit cxGraphics type {$IFDEF DELPHI17} TcxImageIndex = System.UITypes.TImageIndex; {$ELSE} TcxImageIndex = ImgList.TImageIndex; {$ENDIF} Description A TcxImageIndex value is the index of an image within an image list.
Page 173 of 938
TcxIndicatorKind type Enumerates indicator cell icons. Unit cxLookAndFeelPainters type TcxIndicatorKind = (ikNone, ikArrow, ikEdit, ikInsert, ikMultiDot, ikMultiArrow, ikFilter); Description Values include: Value Meaning Sample
ikNone No icon is displayed.
ikArrow Icon that marks the currently focused row (node).
ikEdit Icon that marks the row (node) being currently edited or modified.
ikInsert Icon that marks an inserted row (node). In the ExpressQuantumGrid, this icon is also used to mark the new item row.
ikMultiDot Icon that marks a selected but not focused row (node) when more than one row (node) is selected.
ikMultiArrow Icon that marks the currently focused and selected row (node) when more than one row (node) is selected.
ikFilter Icon that marks the filter row in the ExpressQuantumGrid.
Page 174 of 938
TcxLockedStateImageOptions.AssignedValues TcxLockedStateImageOptions Specifies message box settings that override global settings. type TcxLockedStateImageAssignedValue = (lsiavFont, lsiavColor); TcxLockedStateImageAssignedValues = set of TcxLockedStateImageAssignedValue; property AssignedValues: TcxLockedStateImageAssignedValues; Description Values include:
The default value of the AssignedValues property is [].
Value Meaning
lsiavFont If set, the Font overrides the global Font setting.
lsiavColor If set, the Color overrides the global Color setting.
Page 175 of 938
TcxLockedStateImageEffect type See Also Enumerates visual effects for a "Locked View" image. Unit cxControls type TcxLockedStateImageEffect = (lsieNone, lsieLight, lsieDark); Description Values include: Value Meaning
lsieNone A visual effect is not applied.
lsieLight A "Locked View" image is painted light.
lsieDark A "Locked View" image is painted dark.
Page 176 of 938
TcxLockedStateImageShowingMode type See Also Enumerates visual effects for a "Locked View" image. Unit cxControls type TcxLockedStateImageShowingMode = (lsimNever, lsimPending, lsimImmediate); Description Values include: Value Meaning
lsimNever The "Locked View" image is not displayed.
lsimPending The "Locked View" image is displayed when the control is invalidated (for example, as a result of end-user actions over this control).
lsimImmediate The "Locked View" image is displayed when updates begin.
Page 177 of 938
TcxProgressEvent type See Also The procedural type used to define progress-tracking events and callback methods. Unit cxClasses type TcxProgressEvent = procedure(Sender: TObject; Percent: Integer) of object;
Description A TcxProgressEvent type procedure is a method (an event handler or callback method) that is used to track the progress of a time-consuming operation (like data export) and abort it if necessary by calling Abort within the method. The Sender parameter specifies an object that fires the progress-tracking event handler or callback method. The Percent parameter returns the percentage value (which normally ranges from 0 to 100) indicating the progress of an operation being executed. The following code example shows how to implement a callback method (called TrackProgress) that updates a label caption with the progress of an operation and aborts it if certain conditions are met. type
// ... TMyForm = class(TForm)
// ... procedure TrackProgress(Sender: TObject; Percent: Integer);
// ... end; implementation procedure TMyForm.TrackProgress(Sender: TObject; Percent: Integer); begin Label1.Caption := IntToStr(Percent) + '% done.'; if <Your Condition> then
Abort; end;
Page 178 of 938
TcxRecordScrollMode type
Enumerates content scrolling modes. Unit cxControls type TcxRecordScrollMode = (rsmDefault, rsmByRecord, rsmByPixel); Description Values include:
Currently, only the following DevExpress controls support switching the content scrolling mode via their OptionsBehavior.RecordScrollMode property:
l The ExpressQuantumGrid Table View and Banded Table View; l The ExpressQuantumGrid Layout View in lvvmSingleRow or lvvmSingleColumn display mode; l The virtual or data-aware ExpressVerticalGrid control; l The ExpressQuantumTreeList control.
Value Meaning
rsmByRecord Per-record content scrolling. Note that the term "record" implies the record representation, which may vary depending on the control in use. For instance, in a tree list, nodes represent records. So, rsmByRecord corresponds to node-by-node (per-node) content scrolling.
rsmByPixel Per-pixel (smoother) content scrolling.
rsmDefault The content scrolling mode is determined automatically, based on the TouchMode property setting. In Touch mode (the TouchMode property is set to True), per-pixel content scrolling is used. Otherwise – per-record scrolling.
Page 179 of 938
TcxRotationAngle type See Also Enumerates text rotation options. Unit cxGraphics type
TcxRotationAngle = (ra0, raPlus90, raMinus90, ra180); Description Values include:
Use the dxUseAntialiasingForRotatedText global constant to control if the ClearType antialiasing is applied to a rotated text in your application.
Value Description
ra0 No rotation. A text is painted horizontally.
raPlus90 A text is rotated 90 degrees counterclockwise.
raMinus90 A text is rotated 90 degrees clockwise.
ra180 A text is rotated 180 degrees.
Page 180 of 938
TcxTextAlignX type See Also Enumerates horizontal text alignment options. Unit cxDrawTextUtils type TcxTextAlignX = (taLeft, taCenterX, taRight, taJustifyX, taDistributeX);
Description Options include: Value Description
taLeft The text is aligned to the left of an item’s drawing rectangle.
taCenterX The text is horizontally centered within an item’s drawing rectangle.
taRight The text is right aligned of an item’s drawing rectangle.
taJustifyX The text is truncated if it exceeds an item's width.
taDistributeX The words in the text are distributed evenly between the left and right edges of the item.
Page 181 of 938
TcxTextAlignY type See Also Enumerates vertical text alignment options. Unit cxDrawTextUtils type TcxTextAlignY = (taTop, taCenterY, taBottom, taDistributeY);
Description Options include: Value Description
taTop The text is aligned to the top of an item’s drawing rectangle.
taCenterY The text is vertically centered within an item’s drawing rectangle.
taBottom The text is aligned to the bottom of an item’s drawing rectangle.
taDistributeY The words in the text are distributed evenly between the top and bottom edges of an item.
Page 182 of 938
TDay type Unit cxDateUtils type TDay = (dSunday, dMonday, dTuesday, dWednesday, dThursday, dFriday, dSaturday); Description Enumerates days of the week.
Page 183 of 938
TDays type Unit cxDateUtils type TDays = set of TDay;
Description Represents a set of days of the week.
Page 184 of 938
TdxAlertWindowButtonKind type See Also Enumerates alert window buttons. Unit cxLookAndFeelPainters type TdxAlertWindowButtonKind = (awbkClose, awbkPin, awbkDropdown, awbkPrevious, awbkNext, awbkCustom); Description Values include: Value Description
awbkClose The Close caption button.
awbkPin The Pin caption button.
awbkDropdown The Dropdown caption button.
awbkPrevious The Previous Message navigation panel button.
awbkNext The Next Message navigation panel button.
awbkCustom A custom button.
Page 185 of 938
TdxAutoSizeMode type See Also Enumerates automatic sizing options. Unit cxControls type TdxAutoSizeMode = (asNone, asAutoWidth, asAutoHeight, asAutoSize); Description Values include: Value Meaning
asNone A control is not sized automatically.
asAutoWidth A control automatically adjusts its width and keeps it at the minimum width required to entirely display the contents.
asAutoHeight A control automatically adjusts its height and keeps it at the minimum height required to entirely display the contents.
asAutoSize A control automatically adjusts both the width and height and keeps them at the minimum sizes required to entirely display the contents.
Page 186 of 938
TdxFader.State TdxFader See Also Enables fading animation effects within an application. type
TdxFaderAnimationState = (fasDefault, fasEnabled, fasDisabled); property State: TdxFaderAnimationState;
Description Values include:
The default value of the State property is fasDefault.
Value Description
fasDefault Fading animation effects are enabled if transition effects are enabled for menus and tooltips in the Operating System. See the corresponding option in the Effects window available via Display Properties | Appearance | Effects. In Windows® Vista or later, these effects are always enabled.
fasEnabled Fading animation effects are enabled.
fasDisabled Fading animation effects are disabled.
Page 187 of 938
TdxGalleryItemCheckMode type How To Check And Uncheck Gallery Items Specifies the item selection mode. Unit dxGallery type TdxGalleryItemCheckMode = (icmNone, icmSingleCheck, icmSingleRadio, icmMultiple); Description You can choose one of the following selection modes.
The image below shows the multi-selection mode (the ItemCheckMode is set to icmMultiple).
Value Description
icmMultiple Multiple items can be selected.
icmNone Item selection is disabled.
icmSingleCheck One or zero items can be selected.
icmSingleRadio One item is always selected.
Page 188 of 938
TdxGPBrushGradientMode Type
Enumerates the gradient directions of the brush gradient painting mode. Unit dxGDIPlusClasses type TdxGPBrushGradientMode = (gpbgmHorizontal, gpbgmVertical, gpbgmForwardDiagonal, gpbgmBackwardDiagonal); Description The TdxGPBrushGradientMode type is referenced by the GradientMode property implemented in the TdxGPBrush class. The table below lists available directions of the gradient line within the brush, including the brush layout and actual appearance examples. For the convenience of visual comparison, all gradient examples contain the same two key points at the beginning (blue) and the end (red) of the gradient line.
Value Description Brush Layout Brush Example Masked Brush Examples (Painted Surfaces)
gpbgmHorizontal The starting (Offset = 0) and ending (Offset = 1) points of the gradient line are located at the left and right bounds of the painted brush, respectively.
gpbgmVertical The starting (Offset = 0) and ending (Offset = 1) points of the gradient line are located at the top and bottom bounds of the area painted by the brush, respectively.
gpbgmForwardDiagonal The starting (Offset = 0) and ending (Offset = 1) points of the gradient line are located at in the upper-left and bottom-right corners of the area painted by the brush, respectively.
gpbgmBackwardDiagonal The starting (Offset = 0) and ending (Offset = 1) points of the gradient line are located at the upper-right and bottom-left corners of the area painted by the brush, respectively.
Page 189 of 938
TdxGPBrushStyle Type
Enumerates the available brush painting modes. Unit dxGDIPlusClasses type TdxGPBrushStyles = (gpbsSolid, gpbsGradient, gpbsTexture, gpbsClear); Description Use the values of this type to set the required brush painting mode by using the Style property implemented in the TdxGPBrush class. The table below lists the available brush painting modes, including the respective brush appearance examples:
Value Description Brush Example Masked Brush Examples
gpbsSolid The brush solid fill mode. The brush paints a surface with a solid color specified by the Color property implemented in the TdxGPBrush class. The brush’s GradientMode, GradientPoints, and Texture property values are ignored in this painting mode.
gpbsGradient The brush gradient fill mode. The brush paints a surface with a linear color gradient, whose direction and key points are specified by the GradientMode and GradientPoints properties, implemented in the TdxGPBrush class. The brush’s Color and Texture property values are ignored in this painting mode.
gpbsTexture The brush texture fill mode. The brush fills a surface with a bitmap image specified by the Texture property implemented in the TdxGPBrush class. The brush’s Color, GradientMode, and GradientPoints properties are ignored in this painting mode.
gpbsClear The blank brush mode. The brush leaves the painted surface effectively blank, i.e., completely transparent. The brush’s Color, GradientMode, GradientPoints, and Texture property values are ignored in this painting mode. If this painting mode is selected, the brush’s IsEmpty property returns True regardless of any other settings.
Page 190 of 938
TdxGPInterpolationMode Type
Enumerates the interpolation algorithms that are used when images are scaled or rotated. Unit dxGDIPlusClasses type TdxGPInterpolationMode = (imDefault = InterpolationModeDefault, imLowQuality = InterpolationModeLowQuality, imHighQuality = InterpolationModeHighQuality, imBilinear = InterpolationModeBilinear, imBicubic = InterpolationModeBicubic, imNearestNeighbor = InterpolationModeNearestNeighbor, imHighQualityBilinear = InterpolationModeHighQualityBilinear, imHighQualityBicubic = InterpolationModeHighQualityBicubic); Description Available enumeration values range from imLowQuality (best performance) to imHighQualityBicubic (best rendering quality). These values correspond to the InterpolationMode enumeration values declared in the Microsoft GDI+ library. Refer to the "InterpolationMode enumeration" MSDN article at http://msdn.microsoft.com/en-us/library/windows/desktop/ms534141%28v=vs.85%29.aspx to learn more.
Page 191 of 938
TdxGPPenStyle Type
Enumerates the available painting styles of the TdxGPPen line. Unit dxGDIPlusClasses type TdxGPPenStyle = (gppsSolid, gppsDash, gppsDot, gppsDashDot, gppsDashDotDot); Description The TdxGPPenStyle type is referenced by the Style property implemented in the TdxGPPen class. The full list of available line painting style options includes:
Value Description Example
gppsSolid The solid pen style corresponds to a simple solid line.
gppsDash The dash pen style corresponds to a simple dashed
line.
gppsDot The dot pen style corresponds to a simple dotted line.
gppsDashDot The dash-dot pen style corresponds to an
alternating dash and dot line. This mode combines the dashed and dotted line painting styles.
gppsDashDotDot The dash-dot-dot pen style corresponds to the line consisting of the repetitive elements consisting of the dash followed by two dots. This mode combines the dashed and dotted line painting styles.
Page 192 of 938
TdxImageDataFormat Type
Enumerates image formats. Unit dxGDIPlusClasses type TdxImageDataFormat = (dxImageUnknown, dxImageBitmap, dxImageJpeg, dxImagePng, dxImageTiff, dxImageGif, dxImageEmf, dxImageExif, dxImageIcon, dxImageMemoryBmp, dxImageWmf); Description The TdxImageDataFormat type is referenced by the TdxGPImage.ImageDataFormat property and TdxGPImage.SaveToStreamByCodec method. Available formats include:
Value Meaning
dxImageUnknown An image format is unknown.
dxImageBitmap A BMP image format.
dxImageJpeg A JPEG image format.
dxImagePng A PNG image format.
dxImageTiff A TIFF image format.
dxImageGif A GIF image format.
dxImageEmf An EMF image format.
dxImageExif An Exif image format.
dxImageIcon An ICO image format.
dxImageMemoryBmp A BMP image created in memory.
dxImageWmf A WMF image format.
Page 193 of 938
TdxPointDouble type A TPoint type equivalent with the double-precision floating-point X and Y coordinates. Unit cxGeometry type TdxPointDouble = record X: Double; Y: Double; end;
Page 194 of 938
TdxScreenTipBandTextAlign type See Also Enumerates available horizontal alignment options for the ScreenTip’s descriptive text. Unit dxScreenTip type TdxScreenTipBandTextAlign = (stbtaLeft, stbtaRight); Description Values include: Value Meaning
stbtaLeft The descriptive text is aligned to the left of the ScreenTip window
stbtaRight The descriptive text is aligned to the right of the ScreenTip window
Page 195 of 938
TdxSkinName type See Also Represents a skin name. Unit cxClasses type TdxSkinName = type string;
Page 196 of 938
cxClasses Unit Classes TcxComponentCollection TcxComponentCollectionItem TcxDialogMetricsInfo TcxDialogsMetricsStore TcxInterfacedPersistent TcxMRUItem TcxMRUItems TcxOwnedInterfacedCollection Interfaces IcxDialogMetricsInfoData Other Types TcxProgressEvent TdxSkinName Routines cxDialogsMetricsStore cxGetResourceString cxSetResourceString
Page 197 of 938
cxContainer Unit Classes TcxContainer TcxContainerStyle TcxContainerStyleEx TcxCustomContainerStyle TcxStyleController Interfaces IcxContainerInnerControl Global Constants cxContainerShadowWidth cxDefaultAutoCompleteDelay Other Types TcxContainerStateItem Routines GetcxContainer
Page 198 of 938
cxControls Unit Classes TcxControl TcxControlChildComponent TcxLockedStateImageOptions Other Types TcxLockedStateImageAssignedValue TcxLockedStateImageAssignedValues TcxLockedStateImageEffect TcxLockedStateImageShowingMode TcxRecordScrollMode TdxAutoSizeMode
Page 199 of 938
cxDateUtils Unit The cxDateUtils unit provides a library of functions that process date/time values, convert them to a text representation and construct masks to input date values. Types TcxDateEditSmartInput TcxDateElement TcxFirstWeekOfYear TDay TDays Routines CheckDay cxGetDateFormat DateOf DaysPerMonth DateTimeToText DateTimeToTextEx DateToLongDateStr dxChangeMonth dxDecMonth dxGetDateElement dxGetWeekNumber dxIncMonth GetDateRegularExpession IsLeapYear StrToDateDef SmartTextToDate TextToDateEx TimeOf Global Constants NullDate SmartTextToDateFunc Global Variables scxDateEditSmartInput
Page 200 of 938
cxDrawTextUtils Unit Overview Other Types TcxTextAlignX TcxTextAlignY
Page 201 of 938
cxExport Unit Interfaces IcxExportProgress Global Constants cxExportGraphicClass
Page 202 of 938
cxGeometry Unit Classes TcxGeometryObject TcxMargin Other Types TdxPointDouble TdxSizeDouble
Page 203 of 938
cxGraphics Unit Classes TcxCanvas TcxImageCollectionItem TcxImageCollectionItems Components TcxImageCollection TcxImageList Interfaces IcxImageCollectionListener Other Types TcxBorder TcxBorders TcxImageFitMode TcxImageIndex TcxRotationAngle TcxViewParams Global Constants dxUseAntialiasingForRotatedText
Page 204 of 938
cxLocalization Unit Classes TcxLanguage TcxLanguages TcxLocalizer Other Types TcxLocalizerStorageType
Page 205 of 938
cxLookAndFeelPainters Unit Classes TcxCustomLookAndFeelPainter Other Types TcxButtonState TcxCalcButtonKind TcxCheckBoxState TcxContainerBorderStyle TcxEditPopupBorderStyle TcxIndicatorKind TdxAlertWindowButtonKind Global Constants cxContainerMaxBorderWidth cxTouchElementMinSize
Page 206 of 938
cxLookAndFeels Unit Classes TcxLookAndFeel TcxLookAndFeelController Interfaces IcxLookAndFeelNotificationListener Other Types TcxLookAndFeelKind TcxLookAndFeelValue TcxLookAndFeelValues Routines RootLookAndFeel Global Constants cxDefaultIsTouchModeEnabled cxDefaultLookAndFeelKind cxDefaultLookAndFeelNativeStyle cxDefaultLookAndFeelSkinName cxDefaultUseSkins cxIsTouchModeEnabled cxUseSkins
Page 207 of 938
cxPropertiesStore Unit Classes TcxCustomPropertiesStore TcxPropertiesStore TcxPropertiesStoreComponent TcxPropertiesStoreComponents
Page 208 of 938
cxScrollBar Unit Classes TcxScrollBar
Page 209 of 938
cxStyles Unit Classes TcxCustomStyle TcxCustomStyles TcxStyle TcxStyleRepository TcxStyles Other Types TcxStyleValue TcxStyleValues
Page 210 of 938
dxCalendarUtils Unit
Page 211 of 938
dxCustomHint Unit Classes TcxCustomHintStyle TcxCustomHintStyleController
Page 212 of 938
dxFading Unit Classes TdxFader TdxFadingOptions Other Types TdxFaderAnimationState Routines dxFader Global Constants dxFadeInDefaultAnimationFrameCount dxFadeInDefaultAnimationFrameDelay dxFadeOutDefaultAnimationFrameCount dxFadeOutDefaultAnimationFrameDelay
Page 213 of 938
dxGallery Unit Classes TdxCustomGallery TdxCustomGalleryGroup TdxCustomGalleryGroupHeader TdxCustomGalleryGroups TdxCustomGalleryItem TdxCustomGalleryItems TdxGallery TdxGalleryGroup TdxGalleryGroups TdxGalleryItem TdxGalleryItems Other Types TdxGalleryItemCheckMode
Page 214 of 938
dxGDIPlusClasses Unit Classes TdxBMPImage TdxGIFImage TdxGPBrush TdxGPBrushGradientPoints TdxGPCustomBrush TdxGPImage TdxGPPen TdxJPEGImage TdxPNGImage TdxSmartGlyph TdxSmartImage TdxTIFFImage Other Types TdxGPBrushGradientMode TdxGPBrushStyle TdxGPInterpolationMode TdxGPPenStyle TdxImageDataFormat
Page 215 of 938
dxScreenTip Unit Classes TdxCustomScreenTipBand TdxCustomScreenTipLink TdxCustomScreenTipLinks TdxScreenTip TdxScreenTipActionLink TdxScreenTipActionLinks TdxScreenTipBand TdxScreenTipCollection TdxScreenTipFooterBand TdxScreenTipLink TdxScreenTipLinks TdxScreenTipRepository TdxScreenTipStyle Other Types TdxScreenTipBandTextAlign TdxScreenTipBandType TdxScreenTipRepositoryFonts
Page 216 of 938
dxThreading Unit Global Constants dxEnableMultiThreading
Page 217 of 938
Icon Library
The DevExpress Icon Library is a rich collection of icons and images created by our design team. The collection includes both full color and grayscale images to meet your specific requirements. Shipped as part of the Express Cross Platform Library, the DevExpress Icon Library is installed in the "<DevExpress VCL installation folder>\ExpressLibrary\Sources" folder. Image files are categorized in a simple folder structure based on function. You can extend the Icon Library with custom (external) images, in order to have centralized access to your image collections during form development. Image Picker The Image Picker is a design-time dialog, which allows you to load images from the Icon Library to specific controls. The Image Picker has powerful search and filtering mechanisms to locate and select images. Use various filter options and the context menu provided by the dialog to accomplish this.
The sections below provide details on how to invoke the Image Picker for the TcxImageList and TcxImageCollection components and image properties. TcxImageList You can load images from the Icon Library to the component’s Image List Editor using the Image Picker. To invoke it, click the Add Image button in the Image List Editor and select the corresponding dropdown menu item. Alternatively, you can press the Alt+Ins key combination.
For a TcxImageList component with 16x16 or 32x32 image dimension, the Image Picker automatically filters out its content to display only relevant images. You can select multiple images, while holding down the Shift or Ctrl key. Refer to the imskListView option description in this topic to learn about methods to modify the selection. TcxImageCollection Click "Add Images from Icon Library…" in the component’s context menu to invoke the Image Picker.
Page 218 of 938
Alternatively, you can add collection items and invoke the editor for their Picture property to open the Image Picker (see details below). Image Properties The Express Cross Platform Library replaces the standard Picture Editor used as a property editor of the TdxSmartImage, TPicture, and TBitmap properties with the Image Picker. The Picture Editor and DevExpress Icon Library are displayed on separate tabbed pages. In this mode, you can select only one image from the Image Picker.
In addition to standard image management buttons (Load, Save, and Clear), the Picture Editor page provides an Import button that allows you to load an image from TPicture or TBitmap properties of any control residing on a form. Click the Import button to display a dropdown list populated with the names of suitable controls and their image properties.
Note that only root level properties are included in the dropdown list – for performance reasons, sub-properties are not taken into account. Library Content Extension Since the Image Picker dialog obtains its content based on the file/folder structure, you can add custom image collections and categories and import any image files to them. To accomplish this, create corresponding folders and subfolders in the "<DevExpress VCL installation folder>\ExpressLibrary\Source\Icon Library" folder and copy your own image files to them. Each time the Icon Library is initialized (once per session in your IDE), it scans the "Icon Library" folder for folders, subfolders, and PNG files, and populates the image gallery and the Collection, Categories, and Size lists in the Image Picker dialog accordingly. Note: Because updating or repairing your current installation of DevExpress VCL products erases the "Icon Library" folder, make certain to copy back your custom folders and files to this folder after performing these operations.
Page 219 of 938
Hierarchy IUnknown | IcxDialogMetricsInfoData
Page 220 of 938
TcxMRUItem Object Methods See Also Represents an item in the lists of most recently used items. Unit cxClasses TcxMRUItem = class Description A list of most recently used items is used to maintain the choices (such as filtering options in the ExpressQuantumGrid) made by end-users for future use or tracking activities. The TcxMRUItem class is the base class for classes which represent this kind of items. The Equals abstract function is the only member which is introduced by the TcxMRUItem class. When implemented in descendant classes this function determines whether the item which is represented by an instance of the TcxMRUItem class is equal to the specified item.
Page 221 of 938
TcxMRUItems Object Properties Methods Represents a list of most recently used items. Unit cxClasses TcxMRUItems = class Description A list of most recently used items (MRU list for short) is used to maintain the choices (such as filtering options in the ExpressQuantumGrid) made by end-users for future use or tracking activities. The TcxMRUItems class is the base class for classes which represent MRU lists. Each item in MRU lists is represented by an instance of the TcxMRUItem class. The TcxMRUItems class provides the Add and ClearItems methods and, the Count and MaxCount properties for managing the MRU list’s contents. Use the Items property to access the contents (items). Call the IndexOf function to determine the position of a specific item within the MRU list.
Page 222 of 938
IcxDialogMetricsInfoData.GetInfoData IcxDialogMetricsInfoData See Also Returns a pointer to a value object that contains a dialog’s custom settings. function GetInfoData: Pointer;
Page 223 of 938
IcxDialogMetricsInfoData.GetInfoDataSize IcxDialogMetricsInfoData See Also Returns the size, in bytes, of memory occupied by a value object that contains a dialog’s custom settings. function GetInfoDataSize: Integer;
Page 224 of 938
IcxDialogMetricsInfoData.SetInfoData IcxDialogMetricsInfoData See Also Populates the AData value object with a dialog’s custom settings. procedure SetInfoData(AData: Pointer);
Page 225 of 938
TcxComponentCollectionItem.AddToCollection TcxComponentCollectionItem See Also Adds the current collection element to a collection. procedure AddToCollection(ACollection: TcxComponentCollection); Description Call the AddToCollection method to add the current collection element to the collection specified by the ACollection parameter. Firstly the collection element is removed from the collection that owns it and then added as the last element to the specified collection (thus the element’s ID and Index properties are modified accordingly). Note: If nil is passed as the ACollection parameter then the current collection element is simply removed from the collection that owns it.
Page 226 of 938
TcxComponentCollectionItem.Collection TcxComponentCollectionItem See Also Specifies the collection containing the current element. property Collection: TcxComponentCollection; Description Assigning this property removes the current element from the collection that contains it and then adds this element to a specified collection. Call the SetParentComponent method to add the current element to a collection associated with a certain component.
Page 227 of 938
TcxComponentCollectionItem.GetParentComponent TcxComponentCollectionItem See Also Returns the parent component of the current item’s collection. function GetParentComponent: TComponent; override; Description A collection and its items have the same parent component. Use the GetParentComponent function to access the parent component of the current collection item and its collection. If the current item does not belong to any collection, the GetParentComponent function returns nil. Call the SetParentComponent method to add the current element to a collection associated with a certain component.
Page 228 of 938
TcxComponentCollectionItem.ID TcxComponentCollectionItem See Also Gets the unique identifier of the current collection element. property ID: Integer; ReadOnly Property
Page 229 of 938
TcxComponentCollectionItem.Index TcxComponentCollectionItem See Also Specifies the zero-based index of the current element in the collection. property Index: Integer;
Page 230 of 938
TcxComponentCollectionItem.RemoveFromCollection TcxComponentCollectionItem See Also Removes the current collection element from a collection. procedure RemoveFromCollection(ACollection: TcxComponentCollection); Description Call the RemoveFromCollection method to remove the current collection element from the collection specified by the ACollection parameter.
Page 231 of 938
TcxComponentCollectionItem.SetParentComponent TcxComponentCollectionItem See Also Adds the current element to a collection associated with a specified component. procedure SetParentComponent(Value: TComponent); override; Description This method assigns to the Collection property, the collection associated with a component passed as the Value parameter. Call the GetParentComponent function to access the parent component containing the current collection element.
Page 232 of 938
TcxComponentCollection.Add TcxComponentCollection See Also Creates a new TcxComponentCollectionItem instance and appends it to the collection. function Add: TcxComponentCollectionItem; Description The Add method creates a new TcxComponentCollectionItem instance and adds it to the end of the collection. A reference to the TcxComponentCollectionItem instance that was added is returned.
Page 233 of 938
TcxComponentCollection.BeginUpdate TcxComponentCollection See Also Acquires a lock on the collection. procedure BeginUpdate; virtual; Description Use the BeginUpdate method, if bulk changes are to be made to the collection. This method is used in combination with the EndUpdate method to wrap a block of statements, which update the collection. Note: since the execution of the block of statements can exit with either a normal or exception state, these statements and the EndUpdate method should be contained within try… finally… blocks following the BeginUpdate method to ensure that the lock will be released in all cases.
Page 234 of 938
TcxComponentCollection.Clear TcxComponentCollection See Also Deletes all the TcxComponentCollectionItem instances from the collection and destroys them. procedure Clear; Description Use the Clear method to remove all the TcxComponentCollectionItem objects from the collection.
Page 235 of 938
TcxComponentCollection.Count TcxComponentCollection See Also Gets the number of elements in the collection. property Count: Integer; ReadOnly Property
Page 236 of 938
TcxComponentCollection.Delete TcxComponentCollection See Also Removes the specified TcxComponentCollectionItem instance from the collection and destroys it. procedure Delete(AIndex: Integer); Description The zero-based AIndex parameter specifies the position of the TcxComponentCollectionItem object which is to be removed in the collection.
Page 237 of 938
TcxComponentCollection.EndUpdate TcxComponentCollection See Also Releases a lock and updates the collection. procedure EndUpdate; virtual; Description Use the EndUpdate method paired with the BeginUpdate method to enclose a block of statements, which make bulk updates to the collection. Note: since the execution of a block of statements can exit in either a normal or exception state, the enclosed statements and the EndUpdate method should be contained within try… finally… blocks following the BeginUpdate method to ensure that the lock will be released in all cases.
Page 238 of 938
TcxComponentCollection.FindItemByID TcxComponentCollection See Also Returns a reference to a collection element, by its unique identifier. function FindItemByID(ID: Integer): TcxComponentCollectionItem; Description The FindItemID method returns a value of nil, if there are no elements with ids that match the specified id. The zero-based ID parameter specifies the unique identifier of the required element.
Page 239 of 938
TcxComponentCollection.IndexOf TcxComponentCollection See Also Returns the zero-based index of a specified item within the collection. function IndexOf(AItem: TcxComponentCollectionItem): Integer; Description This function searches the Items collection for the AItem, and if it is found, returns its zero-based index. Otherwise, –1 is returned.
Page 240 of 938
TcxComponentCollection.Insert TcxComponentCollection See Also Creates a new TcxComponentCollectionItem instance and inserts it into the collection at the position specified by the zero-based AIndex parameter. function Insert(AIndex: Integer): TcxComponentCollectionItem; Description The Insert method returns a reference to the TcxComponentCollectionItem instance that was inserted.
Page 241 of 938
TcxComponentCollection.Items TcxComponentCollection See Also Provides indexed access to the collection elements. property Items[AIndex: Integer]: TcxComponentCollectionItem; Description Use the Items property to get the element at the position specified by the zero-based Index parameter.
Page 242 of 938
TcxComponentCollection.Remove TcxComponentCollection See Also Removes a specified item from the collection. procedure Remove(AItem: TcxComponentCollectionItem); Description This method searches the Items collection for the AItem, and if it is found, removes it from the collection using the Delete method call. Otherwise, the Remove method does nothing.
Page 243 of 938
TcxComponentCollection.Update TcxComponentCollection See Also Updates a collection to reflect any changes made. procedure Update(AItem: TcxComponentCollectionItem); virtual; Description The Update method has an empty implementation and is intended to allow developers to provide appropriate functionality in the TcxComponentCollection subclasses. The Update method is called automatically after the changes to the collection elements have been completed. The AItem parameter specifies the TcxComponentCollectionItem instance that was changed. If an argument of nil is passed, then more than one collection element was updated.
Page 244 of 938
TcxDialogMetricsInfo.ClientHeight TcxDialogMetricsInfo See Also Returns the height of the dialog's client area, in pixels. property ClientHeight: Integer; ReadOnly Property
Page 245 of 938
TcxDialogMetricsInfo.ClientWidth TcxDialogMetricsInfo See Also Returns the width of the dialog's client area, in pixels. property ClientWidth: Integer; ReadOnly Property
Page 246 of 938
TcxDialogMetricsInfo.Data TcxDialogMetricsInfo See Also Returns a pointer to a value object that contains custom dialog information. property Data: Pointer; ReadOnly Property
Page 247 of 938
TcxDialogMetricsInfo.DialogClass TcxDialogMetricsInfo Returns a dialog class type. property DialogClass: TClass; ReadOnly Property
Page 248 of 938
TcxDialogMetricsInfo.Left TcxDialogMetricsInfo See Also Returns the horizontal coordinate of the dialog’s top-left corner. property Left: Integer; ReadOnly Property
Page 249 of 938
TcxDialogMetricsInfo.Maximized TcxDialogMetricsInfo Returns whether the dialog window is maximized. property Maximized: Boolean; Description If the dialog window is maximized, the Maximized property returns True. ReadOnly Property
Page 250 of 938
TcxDialogMetricsInfo.Top TcxDialogMetricsInfo See Also Returns the vertical coordinate of the dialog’s top-left corner. property Top: Integer; ReadOnly Property
Page 251 of 938
TcxDialogsMetricsStore.DefaultPosition TcxDialogsMetricsStore See Also Specifies the dialog’s default position. property DefaultPosition: TPosition; Description The specified position is used for the dialog that doesn’t have stored dialog settings. The default value of the DefaultPosition property is poMainFormCenter. The following example demonstrates how to specify that the default position of the dialog is the center of the screen: // Delphi // ... uses // ... cxClasses; initialization cxDialogsMetricsStore.DefaultPosition := poDesktopCenter;
Page 252 of 938
TcxDialogsMetricsStore.InitDialog TcxDialogsMetricsStore See Also Applies settings to the AForm dialog. procedure InitDialog(AForm: TForm); Description The InitDialog method first determines whether settings (previously saved using the StoreMetrics method) exist for the specified dialog. If they do exist, the method simply applies them to the dialog. Otherwise, the default position (specified by the DefaultPosition property) is only applied to the dialog.
Page 253 of 938
TcxDialogsMetricsStore.StoreMetrics TcxDialogsMetricsStore See Also Saves the AForm dialog’s settings. procedure StoreMetrics(AForm: TForm); Description Use the StoreMetrics method to store dialog settings for further use during the application session.
Page 254 of 938
TcxMRUItems.Add TcxMRUItems Adds an item to the current MRU list. procedure Add(AItem: TcxMRUItem); Description Prior to adding the item specified by the AItem parameter to the current MRU list, the Add method determines whether the item is already in the list. If the list contains the item, it is moved to the topmost position (with index equal to 0). Otherwise, the item is added to the MRU list at the topmost position thus enlarging the number of items within it. This takes place until the number of items reaches the MaxCount property’s value. Furthermore, adding an item results in this item being added to the top of the MRU list and deleting the bottom item in that list. Use the Count property to determine the number of items within the current MRU list. To determine the position of a specific item within the MRU list, call the IndexOf function.
Page 255 of 938
TcxMRUItems.ClearItems TcxMRUItems See Also Removes all items from the current MRU list. procedure ClearItems; Description Call the ClearItems method to clear the current MRU list by removing all its items.
Page 256 of 938
TcxMRUItems.Count TcxMRUItems Specifies the number of items stored within the current MRU list. property Count: Integer; Description Decrement this property value to decrease the number of items in the list. As a result, all the items with an index less than the new Count property value will be retained while all other items will be deleted. Use the MaxCount property to limit the number of items stored within the current MRU list. Any change to the list updates the Count property with the MaxCount property value.
Page 257 of 938
TcxMRUItems.IndexOf TcxMRUItems See Also Determines the position (index) of an item within the current MRU list. function IndexOf(AItem: TcxMRUItem): Integer; Description Call the IndexOf function to determine the position (index) of the item specified by the AItem parameter within the current MRU list. This function returns -1 when the specified item does not exist within the current MRU list.
Page 258 of 938
TcxMRUItems.Items TcxMRUItems Provides indexed access to the items within the current MRU list. property Items[Index: Integer]: TcxMRUItem; Description Use the Items property to access the items within the current MRU list using the index. To determine the index of a specific item, call the IndexOf function. Use the Count property to get and set the number of items within the current MRU list. Use the MaxCount property to limit the maximum number of items within the list. To add new items to the current MRU list, call the Add method. ReadOnly Property
Page 259 of 938
TcxMRUItems.MaxCount TcxMRUItems Specifies the maximum number of items stored within the current MRU list. property MaxCount: Integer; Description To limit the maximum number of items stored within the current MRU list up to a specific value, set the MaxCount property to a value greater than 0. As a result, adding the items via the Add method will not expand the list’s capacity. Setting the MaxCount property to 0 indicates that the current MRU list’s capacity is unlimited. Use the Count property to determine the number of items within the current MRU list. You can decrease the number of items by setting the MaxCount property to a value which is less than the current Count property value. All the items with an index less than the new Count property value will be retained, while all other items will be deleted.
Page 260 of 938
TcxMRUItem.Equals TcxMRUItem Determines whether the current item is equal to the specified item. function Equals(AItem: TcxMRUItem): Boolean; virtual; abstract; Description This function is abstract. Descendants of the TcxMRUItem class have to implement the Equals function to return whether the current item is equal to the item which is specified by the AItem parameter. When the items are the same, this function returns True. Otherwise, False is returned.
Page 261 of 938
TcxOwnedInterfacedCollection.OnChange TcxOw nedInterfacedCollection Fires after the current collection has been modified (a collection item is added, inserted, removed, etc.). type TcxCollectionNotifyEvent = procedure(Sender: TObject; AItem: TCollectionItem) of object; property OnChange: TcxCollectionNotifyEvent;
Page 262 of 938
TcxOwnedInterfacedCollection Events TcxOw nedInterfacedCollection Legend In TcxOwnedInterfacedCollection OnChange
Page 263 of 938
TcxComponentCollection Methods TcxComponentCollection Legend In TcxComponentCollection Add BeginUpdate Clear Delete EndUpdate FindItemByID IndexOf Insert Remove Update
Page 264 of 938
TcxComponentCollectionItem Methods TcxComponentCollectionItem Legend In TcxComponentCollectionItem AddToCollection GetParentComponent RemoveFromCollection SetParentComponent
Page 265 of 938
TcxDialogsMetricsStore Methods TcxDialogsMetricsStore Legend In TcxDialogsMetricsStore InitDialog StoreMetrics
Page 266 of 938
TcxMRUItem Methods TcxMRUItem Legend In TcxMRUItem Equals
Page 267 of 938
TcxMRUItems Methods TcxMRUItems Legend In TcxMRUItems Add ClearItems IndexOf
Page 268 of 938
TcxOwnedInterfacedCollection Methods TcxOw nedInterfacedCollection Legend Derived from TCollection Add Assign BeginUpdate Clear Delete EndUpdate FindItemID GetNamePath Insert Owner
Page 269 of 938
TcxComponentCollection Properties TcxComponentCollection Legend In TcxComponentCollection Count Items
Page 270 of 938
TcxComponentCollectionItem Properties TcxComponentCollectionItem Legend In TcxComponentCollectionItem Collection ID Index
Page 271 of 938
TcxDialogMetricsInfo Properties TcxDialogMetricsInfo Legend In TcxDialogMetricsInfo ClientHeight ClientWidth Data DialogClass Left Maximized Top
Page 272 of 938
TcxDialogsMetricsStore Properties TcxDialogsMetricsStore Legend In TcxDialogsMetricsStore DefaultPosition
Page 273 of 938
TcxMRUItems Properties TcxMRUItems Legend In TcxMRUItems Count Items MaxCount
Page 274 of 938
TcxOwnedInterfacedCollection Properties TcxOw nedInterfacedCollection Legend Derived from TCollection Count ItemClass Items
Page 275 of 938
IcxDialogMetricsInfoData Methods IcxDialogMetricsInfoData Legend In IcxDialogMetricsInfoData GetInfoData GetInfoDataSize SetInfoData
Page 276 of 938
Hierarchy TComponent | TcxComponentCollectionItem
Page 277 of 938
Hierarchy TPersistent | TcxComponentCollection
Page 278 of 938
Hierarchy TObject | TcxDialogMetricsInfo
Page 279 of 938
Hierarchy TObject | TcxDialogsMetricsStore
Page 280 of 938
Hierarchy TInterfacedPersistent | TcxInterfacedPersistent
Page 281 of 938
Hierarchy TOwnedCollection | TcxOwnedInterfacedCollection
Page 282 of 938
TcxContainerStyle Object Hierarchy Properties Methods Contains the style settings applied to the associated container control. Unit cxContainer TcxContainerStyle = class(TcxCustomContainerStyle)
Description This class does not introduce any new properties or methods that control the appearance of the associated container control, instead it merely publishes the properties of the TcxCustomContainerStyle class instead. The TcxContainerStyle class represents the type of the Style property in the TcxContainer class which provides the base functionality for all ExpressEditors.
Page 283 of 938
TcxContainerStyleEx Object Hierarchy Properties Methods Contains the style settings which are applied to the associated container control for special states such as disabled, focused or hot-tracked. Unit cxContainer TcxContainerStyleEx = class(TcxCustomContainerStyle)
Description This class, like the TcxContainerStyle class does not introduce new properties and methods that control the appearance of the associated container control, instead it publishes the properties of the TcxCustomContainerStyle class. The set of published properties is determined by the TcxContainerStyleEx class’s functionality, i.e. only border, background color and text style attributes can be used to show that the control is in a special state such as disabled, focused or hot-tracked. The TcxContainerStyleEx class represents the type of the StyleDisabled, StyleFocused and StyleHot properties in the TcxContainer class which provides base functionality for all ExpressEditors.
Page 284 of 938
IcxContainerInnerControl.ControlContainer IcxContainerInnerControl Gets the container control which is returned by the GetControlContainer function. property ControlContainer: TcxContainer read GetControlContainer;
ReadOnly Property
Page 285 of 938
IcxContainerInnerControl.GetControlContainer IcxContainerInnerControl Returns the container control associated with the current inner control. function GetControlContainer: TcxContainer;
Page 286 of 938
TcxContainer.RestoreStyles TcxContainer Restores the default values to the style attributes of all the styles provided by the current container control. procedure RestoreStyles;
Description The RestoreStyles method merely calls the RestoreDefaults method for each style defined in the container control (see the Style, StyleDisabled, StyleFocused and StyleHot for details).
Page 287 of 938
TcxContainer.Style TcxContainer Provides access to the TcxContainerStyle object containing the normal state settings for the container control. property Style: TcxContainerStyle;
Description The Style property provides access to the TcxContainerStyle object that contains the style settings applied to the container control in the normal state. You can use its properties to specify the border color, border style, background color, font settings and look & feel of the container which are accessible via the corresponding properties. Note: To customize the style settings that are used for drawing the container control in states other than the normal one, such as disabled, focused or hot-tracked, use the StyleDisabled, StyleFocused and StyleHot properties, respectively.
Page 288 of 938
TcxContainer.StyleDisabled TcxContainer Provides access to the TcxContainerStyleEx object containing the disabled state settings for the container control. property StyleDisabled: TcxContainerStyleEx;
Description The StyleDisabled property provides access to the TcxContainerStyleEx object that contains the style settings applied to the disabled container control. You can use its properties to specify the border color, border style, background color and font settings which are accessible via the corresponding properties. Note: To customize the style settings that are used for drawing the container control in states other than the disabled one, such as normal, focused or hot-tracked, use the Style, StyleFocused and StyleHot properties, respectively.
Page 289 of 938
TcxContainer.StyleFocused TcxContainer Provides access to the TcxContainerStyleEx object containing the focused state settings for the container control. property StyleFocused: TcxContainerStyleEx;
Description The StyleFocused property provides access to the TcxContainerStyleEx object that contains the style settings applied to the focused container control. You can use its properties to specify the border color, border style, background color and font settings which are accessible via the corresponding properties. Note: To customize the style settings that are used for drawing the container control in states other than the focused one, such as normal, disabled or hot-tracked, use the Style, StyleDisabled and StyleHot properties, respectively.
Page 290 of 938
TcxContainer.StyleHot TcxContainer Provides access to the TcxContainerStyleEx object containing the highlighted state settings for the container control. property StyleHot: TcxContainerStyleEx;
Description The StyleHot property provides access to the TcxContainerStyleEx object that contains the style settings applied to the highlighted (hot-tracked) container control (when the mouse cursor hovers over it). You can use its properties to specify the border color, border style, background color and font settings which are accessible via the corresponding properties. Note: To customize the style settings that are used for drawing the container control in states other than the highlighted one, such as normal, disabled or focused, use the Style, StyleDisabled and StyleFocused properties, respectively.
Page 291 of 938
TcxContainer.Styles TcxContainer Provides access to the styles assigned to the current container control. procedure Styles[AState: TcxContainerStateItem]: TcxCustomContainerStyle;
Description Each style corresponds to a particular container control’s state such as normal, disabled, etc. (see the TcxContainerStateItem type description for details). The Styles property provides an access to the specific style which is assigned to the current container control and matches the control state specified by the AState parameter.
Page 292 of 938
TcxCustomContainerStyle.ActiveStyleController TcxCustomContainerStyle Identifies the style controller which manages the appearance of the associated container control. property ActiveStyleController: TcxStyleController;
Description Use the ActiveStyleController property to get the style controller (TcxEditStyleController or TcxDefaultEditStyleController component) which manages the style of the associated container control and defines the style properties common to several controls. See the Editor Style and StyleController topic for detailed information about the style controllers. ReadOnly Property
Page 293 of 938
TcxCustomContainerStyle.Assign TcxCustomContainerStyle Assigns settings of one TcxContainerStyle object to another. procedure Assign(Source: TPersistent); override;
Description Use the Assign method to copy the settings of one TcxContainerStyle object to the another. The Source parameter represents the source object. The caller is the destination object. Use this method if you want to assign the same or slightly different style settings to several controls.
Page 294 of 938
TcxCustomContainerStyle.AssignedValues TcxCustomContainerStyle Specifies which style properties are assigned via the TcxCustomContainerStyle class. property AssignedValues: TcxContainerStyleValues;
Description The AssignedValues property is a set of flags demonstrating which style properties were set by a user at design time or programmatically. The AssignedValues property controls whether values for style properties are obtained from the current TcxCustomContainerStyle instance or from the style controller, which can be set via the StyleController property. In this case, the assignment of the property values using the specified style controller is not tracked via the control’s AssignedValues property, you should use the style controller’s AssignedValues property instead. The RestoreDefaults method restores the default values of the assigned style attributes and clears all the flags in the AssignedValues property of the current TcxCustomContainerStyle object.
Page 295 of 938
TcxCustomContainerStyle.BeginUpdate TcxCustomContainerStyle Prevents the associated container control from updating due to style changes. procedure BeginUpdate;
Description Each time a property of the TcxContainerStyle object is changed, the associated container control is updated. This behavior is undesirable when you want to perform sequential style changes, since the control will be repainted several times. The BeginUpdate and EndUpdate methods allow you to avoid this. Each time the BeginUpdate method is called, it increments the internal counter. The control is notified of style changes only when this counter is zero (its initial value). Thus, you can perform any style changes after the BeginUpdate method call and they will not affect the control. When calling the EndUpdate method, the counter is decremented, and the control is updated to reflect all style changes performed.
Page 296 of 938
TcxCustomContainerStyle.BorderColor TcxCustomContainerStyle Specifies the border color for the associated container control. property BorderColor: TColor;
Description Use the BorderColor property to change the border color of the associated container control. Note that this property is in effect only if the BorderStyle property's value is either cbsSingle or cbsThick. The image below shows the list box control when the BorderColor property is set to clActiveCaption while the BorderStyle property's value is cbsThick.
Note: the BorderColor property is not in effect if the LookAndFeel.NativeStyle property is set to True (the border color
and style is specified by the operating system's settings). When the BorderColor property is assigned, the csvBorderColor flag is set to the AssignedValues property. The default value of the BorderColor property is clWindowFrame.
Page 297 of 938
TcxCustomContainerStyle.BorderStyle TcxCustomContainerStyle Specifies the border style of the associated container control. property BorderStyle: TcxContainerBorderStyle;
Description Use the BorderStyle property to change the border style applied to the associated container control. The Edges property specifies which border sides are to be displayed. See the TcxContainerBorderStyle type's description for the list of available values for the BorderStyle property. Note: if the BorderStyle property is set to a value other than cbsNone this property is not in effect while the
LookAndFeel.NativeStyle property is set to True. The border style in this case is specified by the operating system's settings.
When the BorderStyle property is assigned, the csvBorderStyle flag is set to the AssignedValues property. The default value of the BorderStyle property is cbsDefault.
Page 298 of 938
TcxCustomContainerStyle.Color TcxCustomContainerStyle Specifies the background color of the associated container control. property Color: TColor;
Description Use the Color property to specify the background color of the control. The image below displays the list box control, when the Color property is set to clWhite and clInactiveCaptionText, respectively.
When the Color property is assigned, the csvColor flag is set to the AssignedValues property. The default value of the Color property is clWindow.
Page 299 of 938
TcxCustomContainerStyle.Container TcxCustomContainerStyle Gets the associated container control. property Container: TcxContainer;
Description The TcxCustomContainerStyle object specifies the style settings for bound controls. For instance, it is used to control the style of the TcxListBox control and can be accessed via its Style property. The Container property returns the associated container control to which style settings are applied. Normally, you will not need to use this property in your applications. ReadOnly Property
Page 300 of 938
TcxCustomContainerStyle.Create TcxCustomContainerStyle Creates a new instance of the TcxContainerStyle object. procedure Create(AOwner: TPersistent; ADirectAccessMode: Boolean); virtual;
Description The constructor is used to create a new TcxContainerStyle object with default style settings. The AOwner parameter represents the associated container control. The ADirectAccessMode parameter is used to indicate whether the control accesses the style settings directly, or the style object should notify it of changes performed. It must be set to False to enable automatic notification. Commonly, you will have no need to create TcxContainerStyle objects in applications. They are created automatically by controls that use them.
Page 301 of 938
TcxCustomContainerStyle.Destroy TcxCustomContainerStyle Destroys the TcxContainerStyle object. procedure Destroy; override;
Description The destructor is used to dispose the TcxContainerStyle object and free any allocated memory. Commonly, you will have no need to destroy such objects manually in applications. Objects of this type are automatically destroyed by controls that use them.
Page 302 of 938
TcxCustomContainerStyle.Edges TcxCustomContainerStyle Specifies which border edges are to be displayed. type
TcxBorder = (bLeft, bTop, bRight, bBottom); TcxBorders = set of TcxBorder; property Edges: TcxBorders;
Description Use the Edges property to specify which borders are displayed around the control. This property can contain a set of values corresponding to border edges. The table below lists the available values and describes them.
The image below displays the list box control when the Edges property is set to [bLeft, bTop] and the BorderStyle property value is cbsSingle.
When the Edges property is assigned, the csvEdges flag is set to the AssignedValues property. The default value of the Edges property is [bLeft,bTop,bRight,bBottom].
Value Description
bLeft If this value is in the set, the left border edge is displayed.
bTop If this value is in the set, the top border edge is displayed.
bRight If this value is in the set, the right border edge is displayed.
bBottom If this value is in the set, the bottom border edge is displayed.
Page 303 of 938
TcxCustomContainerStyle.EndUpdate TcxCustomContainerStyle Updates the associated container control with respect to style changes made after the BeginUpdate method call. procedure EndUpdate;
Description The BeginUpdate and EndUpdate methods are used in combination. The first one increments the internal counter, while the second decrements it and updates the control. The internal counter is initially zero and must be zero for the control to update. So you can implement sequential style changes between the BeginUpdate and EndUpdate method calls and the control will be repainted only once.
Page 304 of 938
TcxCustomContainerStyle.Font TcxCustomContainerStyle Specifies the font used to display the text content of the associated container control. property Font: TFont;
Description Use the Font property to change the font used to paint the control’s content. When the Font property is assigned, the csvFont flag is set to the AssignedValues property. The image below shows the list box with a standard and custom font applied.
Note: The values of the Font, TextColor and TextStyle properties comprise the font settings used to paint the control’s content and can be obtained via the GetVisibleFont function.
Page 305 of 938
TcxCustomContainerStyle.GetVisibleFont TcxCustomContainerStyle Retrieves the font settings that the current style specified for displaying the container control’s text. function GetVisibleFont: TFont;
Description Retrieves the font settings of the TFont type the current style specified via the Font, TextColor and TextStyle properties for displaying the container control’s text.
Page 306 of 938
TcxCustomContainerStyle.HotTrack TcxCustomContainerStyle Specifies whether the associated container control changes its border style when the mouse pointer enters or leaves its area. property HotTrack: Boolean;
Description If the HotTrack property is set to True, the associated container control is hot-tracked when the mouse pointer enters its area. Note that when this control has focus, it doesn’t respond to mouse movements. Controls are only hot-tracked if another control is currently focused. Controls are hot-tracked by changing their border style. Note, that the HotTrack property is not in effect when the border is painted in 3D or thick style. The border style depends on the BorderStyle and LookAndFeel.Kind property values. When the HotTrack property is assigned, the csvHotTrack flag is set to the AssignedValues property. The default value of the HotTrack property is True.
Page 307 of 938
TcxCustomContainerStyle.LookAndFeel TcxCustomContainerStyle Specifies the look & feel settings of the associated container control. property LookAndFeel: TcxLookAndFeel;
Description Use the LookAndFeel property to specify the painting style for the control and the way it responds to user actions. You can use the system-defined painting style and behavior by setting the LookAndFeel.NativeStyle property to True. If so, most of the style settings specified by the TcxCustomContainerStyle object’s properties are ignored. Otherwise, the look & feel of the associated container control is specified by the LookAndFeel.Kind or LookAndFeel.SkinName property taking into account the specified style settings. The image below shows the list box control when the LookAndFeel.NativeStyle property's value is True (The image assumes that the Windows XP operating system is used).
The next image displays the same control when the LookAndFeel.Kind property's value is lfFlat, lfStandard, lfUltraFlat, and lfOffice11 respectively (the LookAndFeel.NativeStyle property value is False).
Page 308 of 938
TcxCustomContainerStyle.OnChanged TcxCustomContainerStyle Occurs when any property of the TcxCustomContainerStyle class is changed. type TNotifyEvent = procedure(Sender: TObject) of object; property OnChanged: TNotifyEvent;
Description The OnChanged event occurs every time any property of the TcxCustomContainerStyle class is changed.
Page 309 of 938
TcxCustomContainerStyle.ParentStyle TcxCustomContainerStyle Retrieves the parent style for the current style of the associated container control. property ParentStyle: TcxCustomContainerStyle;
Description Use the ParentStyle property to get the style used as a base style for various painting styles (disabled, focused, hot-tracked). ReadOnly Property
Page 310 of 938
TcxCustomContainerStyle.RestoreDefaults TcxCustomContainerStyle Applies default look & feel to the control. procedure RestoreDefaults; virtual;
Description The RestoreDefaults method assigns an empty set to the LookAndFeel.AssignedValues property. Thus, the LookAndFeel property doesn’t affect the style of the associated container control. Values of other properties are preserved and specify the appearance of the control.
Page 311 of 938
TcxCustomContainerStyle.Shadow TcxCustomContainerStyle Specifies whether a shadow is displayed for the associated container control. property Shadow: Boolean;
Description Set the Shadow property to True to display the control’s shadow. The width of the shadow is specified by the cxContainerShadowWidth global constant. When the Shadow property is assigned, the csvShadow flag is set to the AssignedValues property. The image below shows the list box control when the Shadow property is set to False and True respectively.
Note: Setting the Shadow property to True has no effect if the LookAndFeel.NativeStyle property is set to True. The default value of the Shadow property is False.
Page 312 of 938
TcxCustomContainerStyle.State TcxCustomContainerStyle Indicates the state which the current style represents. property State: TcxContainerStateItem;
Description Use the State property to determine the state of the associated container control which the current style represents. See the TcxContainerStateItem for a list of the possible control states. ReadOnly Property
Page 313 of 938
TcxCustomContainerStyle.StyleController TcxCustomContainerStyle Identifies the style controller for the current TcxCustomContainerStyle object. property StyleController: TcxStyleController;
Description Use the StyleController property to assign a style controller which defines style attributes common to several controls. See the Editor Style and StyleController topic for detailed information about style controllers.
Page 314 of 938
TcxCustomContainerStyle.TextColor TcxCustomContainerStyle Specifies the color of the text which is displayed by the associated container control. property TextColor: TColor;
Description The TextColor defines the color of the text (in contrast to the background color determined by the Color property). When the TextColor property is assigned, the csvTextColor flag is set to the AssignedValues property. For an unassigned TextColor property, the return value is equal to the Font.Color property’s value. Note: The values of the Font, TextColor and TextStyle properties comprise the font settings used to paint the control’s content and can be obtained via the GetVisibleFont function.
Page 315 of 938
TcxCustomContainerStyle.TextStyle TcxCustomContainerStyle Specifies the style of the text which is displayed by the associated container control. property TextStyle: TFontStyles;
Description There are four styles available: Bold, Italic, Underline and StrikeOut. When the TextStyle property is assigned, the csvTextStyle flag is set to the AssignedValues property. For an unassigned TextStyle property, the return value is equal to the Font.Style property’s value. Note: The values of the Font, TextColor and TextStyle properties comprise the font settings used to paint the control’s content and can be obtained via the GetVisibleFont function.
Page 316 of 938
TcxCustomContainerStyle.TransparentBorder TcxCustomContainerStyle Specifies whether a transparent border is drawn around the associated container control. property TransparentBorder: Boolean;
Description Set the TransparentBorder property to True to draw a transparent border around the control. Otherwise, it will not be drawn. The width of a transparent border depends on the current border’s width specified by the BorderStyle property. The aggregate transparent border’s and current border’s width cannot exceed 2 pixels. For instance, a transparent border is 2 pixels wide for a container control with its BorderStyle property set to cbsNone and 1 pixel wide for a container control with the BorderStyle property set to cbsSingle, cbsUltraFlat or cbsOffice11. For a control which uses native windows style for its painting the transparent border is drawn when its BorderStyle property is set to cbsNone. When the TransparentBorder property is assigned, the csvTransparentBorder flag is set to the AssignedValues property.
Page 317 of 938
TcxStyleController.RestoreStyles TcxStyleController Restores the default values to all the style attributes associated with the current style controller. procedure RestoreStyles;
Description The RestoreStyles method merely calls the RestoreDefaults method for each style defined in the container control (see the Style, StyleDisabled, StyleFocused and StyleHot for details) which is associated with the current style controller.
Page 318 of 938
TcxStyleController.Styles TcxStyleController Provides access to the styles assigned to the current style controller. procedure Styles[AState: TcxContainerStateItem]: TcxCustomContainerStyle;
Description Each style corresponds to a particular control state such as normal, disabled, etc. (see the TcxContainerStateItem type description for details). The Styles property provides access to the specific style which is assigned to the current style controller and matches the control state specified by the AState parameter.
Page 319 of 938
TcxContainer Events TcxContainer Legend Derived from TcxControl Create Destroy InvalidateRect
Page 320 of 938
TcxCustomContainerStyle Events TcxCustomContainerStyle Legend In TcxCustomContainerStyle OnChanged
Page 321 of 938
TcxContainer Methods TcxContainer Legend In TcxContainer RestoreStyles Derived from TcxControl Create Destroy InvalidateRect
Page 322 of 938
TcxContainerStyle Methods TcxContainerStyle Legend Derived from TcxCustomContainerStyle Assign BeginUpdate Create Destroy EndUpdate RestoreDefaults
Page 323 of 938
TcxContainerStyleEx Methods TcxContainerStyleEx Legend Derived from TcxCustomContainerStyle Assign BeginUpdate Create Destroy EndUpdate RestoreDefaults
Page 324 of 938
TcxCustomContainerStyle Methods TcxCustomContainerStyle Legend In TcxCustomContainerStyle Assign BeginUpdate Create Destroy EndUpdate GetVisibleFont RestoreDefaults
Page 325 of 938
TcxStyleController Methods TcxStyleController Legend In TcxStyleController RestoreStyles
Page 326 of 938
TcxContainer Properties TcxContainer Legend In TcxContainer Style StyleDisabled StyleFocused StyleHot Styles Derived from TcxControl ActiveCanvas BorderStyle Bounds Canvas ClientBounds FocusOnClick Hint IsDesigning IsDestroying IsFocused IsLoading LookAndFeel PopupMenu Derived from TControl Hint ShowHint {$IFDEF DELPHI14} Touch
{$ENDIF}
Page 327 of 938
TcxContainerStyle Properties TcxContainerStyle Legend Derived from TcxCustomContainerStyle ActiveStyleController AssignedValues BorderColor BorderStyle Color Container Edges Font HotTrack LookAndFeel Shadow State StyleController TextColor TextStyle TransparentBorder
Page 328 of 938
TcxContainerStyleEx Properties TcxContainerStyleEx Legend Derived from TcxCustomContainerStyle ActiveStyleController AssignedValues BorderColor BorderStyle Color Container Edges Font HotTrack LookAndFeel Shadow State StyleController TextColor TextStyle TransparentBorder
Page 329 of 938
TcxCustomContainerStyle Properties TcxCustomContainerStyle Legend In TcxCustomContainerStyle ActiveStyleController AssignedValues BorderColor BorderStyle Color Container Edges Font HotTrack LookAndFeel ParentStyle Shadow State StyleController TextColor TextStyle TransparentBorder
Page 330 of 938
TcxStyleController Properties TcxStyleController Legend In TcxStyleController Styles
Page 331 of 938
IcxContainerInnerControl Methods IcxContainerInnerControl Legend In IcxContainerInnerControl GetControlContainer
Page 332 of 938
IcxContainerInnerControl Properties IcxContainerInnerControl Legend In IcxContainerInnerControl ControlContainer
Page 333 of 938
Hierarchy TPersistent | TcxCustomContainerStyle | TcxContainerStyleEx
Page 334 of 938
Hierarchy TPersistent | TcxCustomContainerStyle | TcxContainerStyle
Page 335 of 938
Hierarchy TCustomControl | TcxControl | TcxContainer
Page 336 of 938
Hierarchy TPersistent | TcxCustomContainerStyle
Page 337 of 938
Hierarchy TComponent | TcxStyleController
Page 338 of 938
TcxControlChildComponent.Control TcxControlChildComponent Specifies the parent control of the current component. property Control: TcxControl;
Description Use the Control property to access the parent of the current component. It is initialized by a parameter passed in the CreateEx constructor.
Page 339 of 938
TcxControlChildComponent.CreateEx TcxControlChildComponent Creates a new child component. constructor CreateEx(AControl: TcxControl; AAssignOwner: Boolean = True);
Description CreateEx calls the constructor inherited from TComponent passing a specific owner as a parameter. If the AAssignOwner parameter is True then the owner of AControl becomes the owner of the new child component. Otherwise, no owner is passed. The AControl parameter specifies the parent of the new child component.
Page 340 of 938
TcxControlChildComponent.Destroy TcxControlChildComponent Destroys the current component. destructor Destroy; override;
Description The destructor destroys the current instance of the TcxControlChildComponent class, removes itself from the parent component and calls the inherited destructor.
Page 341 of 938
TcxControlChildComponent.IsDestroying TcxControlChildComponent Specifies whether the component is currently being destroyed. property IsDestroying: Boolean;
Description The IsDestroying property specifies whether the ComponentState property inherited from TComponent contains the csDestroying flag thus indicating that the component is being destroyed. ReadOnly Property
Page 342 of 938
TcxControlChildComponent.IsLoading TcxControlChildComponent Specifies whether the current component is being loaded. property IsLoading: Boolean;
Description The IsLoading property returns True, if the ComponentState property inherited from TComponent contains the csLoading flag. This indicates that the component (including its children) is being loaded from a file. ReadOnly Property
Page 343 of 938
TcxControl.ActiveCanvas TcxControl Provides access to the current control’s drawing surface. property ActiveCanvas: TcxCanvas;
Description If a handle to a device context is allocated to the control’s drawing surface, this property provides access to the Canvas property value. Otherwise, a drawing surface is recreated (if necessary), and then returned as a property value. ReadOnly Property
Page 344 of 938
TcxControl.BorderStyle TcxControl Specifies the border style of the associated control. type
TcxControlBorderStyle = (cxcbsNone, cxcbsDefault); property BorderStyle: TcxControlBorderStyle;
Description Use the BorderStyle property to change the border style applied to the associated control. The table below lists values available for the BorderStyle property and provides their description: Value Meaning
cxcbsNone No border is painted around the control.
cxcbsDefault The border style is specified by the look and feel applied to the control (see the LookAndFeel property).
Page 345 of 938
TcxControl.Bounds TcxControl Returns the bound rectangle for a control in pixels. property Bounds: TRect;
Description Use the Bounds property to access the TRect type that specifies the rectangular region occupied by a control. The horizontal and vertical size of this rectangle is equal to the Width and Height property values of the TcxControl object. ReadOnly Property
Page 346 of 938
TcxControl.Canvas TcxControl See Also Provides access to the current control’s drawing surface. property Canvas: TcxCanvas;
Description This property provides a library of functions to perform primitive graphic operations such as drawing lines, rectangles, images, text, etc. The TcxCanvas class is designed to provide proper working in VCL and CLX applications. ReadOnly Property
Page 347 of 938
TcxControl.ClientBounds TcxControl Returns the rectangle of a control’s client area (in pixels). property ClientBounds: TRect;
Description Read the ClientBounds property to obtain the size of a control’s client area. Client area size is obtained by subtracting the border (and scrollbars, if any) size from the size of the area occupied by a control (returned by the Bounds property). ReadOnly Property
Page 348 of 938
TcxControl.Create TcxControl Creates a new TcxControl object instance. procedure Create(AOwner: TComponent); override;
Description Call the Create method to instantiate a control at runtime. After calling the inherited constructor, the Create method creates a canvas and scrollbars for the control and initializes its properties and variables. The canvas is provided by the TcxCanvas object which provides a drawing surface for cross-platform windowed controls.
Page 349 of 938
TcxControl.Destroy TcxControl Destroys a TcxControl object instance. procedure Destroy; override;
Description The Destroy method is used to free any memory or resources allocated in the Create method.
Page 350 of 938
TcxControl.FocusOnClick TcxControl Specifies whether the control gets a focus when it has been clicked. property FocusOnClick: Boolean; Description Set the FocusOnClick property to True to acquire a focus when the control has been clicked. The default value of the FocusOnClick property is True.
Page 351 of 938
TcxControl.Hint TcxControl See Also Specifies a hint message for the control. property Hint: string;
Page 352 of 938
TcxControl.InvalidateRect TcxControl Adds the region occupied by a control rectangle to a specified window's update region. The update region represents a portion of the control client area that must be redrawn. procedure InvalidateRect(const R: TRect; EraseBackground: Boolean); Description Call the InvalidateRect method when the area occupied by a control rectangle will need to be repainted. The R parameter points to the TRect that contains client coordinates of the control rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region. The EraseBackground parameter specifies whether the background within the control rectangle region specified by the R parameter is to be erased when processing the update region. If this parameter is True, the background is erased when redrawing the control rectangle region. If this parameter is False, the background remains unchanged.
Page 353 of 938
TcxControl.IsDesigning TcxControl Specifies whether the control is currently being manipulated by the form designer. property IsDesigning: Boolean;
Description This property returns True if the ComponentState property inherited from the TComponent class contains the csDesigning flag indicating that the form designer is manipulating the control. Otherwise, False is returned. ReadOnly Property
Page 354 of 938
TcxControl.IsDestroying TcxControl Specifies whether the control is being destroyed. property IsDestroying: Boolean;
Description The state of a control is determined by the ComponentState property inherited from the TComponent class. The IsDestroying property returns True if a control is about to be destroyed (the ComponentState contains the csDestroying flag). Otherwise, the property returns False. ReadOnly Property
Page 355 of 938
TcxControl.IsFocused TcxControl Indicates whether a control has focus. property IsFocused: Boolean;
Description Read the IsFocused property to determine if a control currently receives input from the user. The IsFocused property is set to True if the control has focus; otherwise, False. ReadOnly Property
Page 356 of 938
TcxControl.IsLoading TcxControl Specifies whether the current control is being loaded. property IsLoading: Boolean;
Description The ComponentState property, inherited from the TComponent class, determines the state of a control. If it contains the csLoading flag meaning that a control and all its children are being loaded from a file, the IsLoading property returns True. Otherwise, False is returned. ReadOnly Property
Page 357 of 938
TcxControl.LookAndFeel TcxControl Specifies the default look and feel of a control. property LookAndFeel: TcxLookAndFeel;
Description LookAndFeel controls the default look and feel of a control (tab panels, dropdown buttons) and the style behavior in response to user actions. The LookAndFeel.NativeStyle attribute determines whether the control’s elements (borders, buttons and background) are drawn using the display settings determined by the operating system. For instance, in Windows XP the current XP theme is used if LookAndFeel.NativeStyle is set to True. If LookAndFeel.NativeStyle is set to False, then the LookAndFeel.Kind or LookAndFeel.SkinName property specifies the default look and feel style of a control. These styles determine the manner in which a grid is painted and responds to user events.
Page 358 of 938
TcxControl.OnMouseEnter TcxControl See Also Occurs when the mouse pointer moves over a control. type TNotifyEvent = procedure(Sender: TObject) of object; property OnMouseEnter: TNotifyEvent;
Description Handle the OnMouseEnter event to perform specific actions when an end-user moves the mouse over the control. For example, you can use this event to change the control’s appearance (font, color, border width, etc.) when the mouse pointer hovers over the control, and then use the OnMouseLeave event to reverse its appearance back to the default when the mouse leaves the control.
Page 359 of 938
TcxControl.OnMouseLeave TcxControl See Also Occurs when the mouse pointer leaves a control. type TNotifyEvent = procedure(Sender: TObject) of object; property OnMouseLeave: TNotifyEvent;
Description Handle the OnMouseLeave event to perform specific actions when an end-user moves the mouse pointer off the control. For example, you can use this event to undo any changes that were made in the OnMouseEnter event handler.
Page 360 of 938
TcxControl.PopupMenu TcxControl Specifies the popup menu that is associated with a control. property PopupMenu: TComponent;
Description The PopupMenu property specifies the popup menu that is associated with the current control.
Page 361 of 938
TcxLockedStateImageOptions.Color TcxLockedStateImageOptions Specifies the background color of the message box. property Color: TColor; Description If the Color property is clNone, the parent’s color is used. The default value of the Color property is clNone.
Page 362 of 938
TcxLockedStateImageOptions.Effect TcxLockedStateImageOptions Specifies the visual effect for a "Locked View" image. type TcxLockedStateImageEffect = (lsieNone, lsieLight, lsieDark); property Effect: TcxLockedStateImageEffect; Description Refer to the TcxLockedStateImageEffect description, for details. The default value of the Effect property is lsieNone.
Page 363 of 938
TcxLockedStateImageOptions.Enabled TcxLockedStateImageOptions Specifies whether to display a "Locked View" image. property Enabled: Boolean; Description Set the Enabled property to True, to make the image visible. The default value of the Enabled property is True.
Page 364 of 938
TcxLockedStateImageOptions.Font TcxLockedStateImageOptions Specifies the font of the message string. property Font: TFont; Description If the Font property is not specified, the grid’s Font setting is used.
Page 365 of 938
TcxLockedStateImageOptions.ShowText TcxLockedStateImageOptions Specifies whether to display a message box over a "Locked View" image. property ShowText: Boolean; The default value of the ShowText property is False.
Page 366 of 938
TcxLockedStateImageOptions.Text TcxLockedStateImageOptions Specifies the message string. property Text: string; Description The default value of this property is specified by the scxLockedStateText resource string defined in the cxLibraryStrs unit.
Page 367 of 938
TcxControl Events TcxControl Legend In TcxControl OnMouseEnter OnMouseLeave Derived from TControl {$IFDEF DELPHI14} OnGesture
{$ENDIF}
Page 368 of 938
TcxControl Methods TcxControl Legend In TcxControl Create Destroy InvalidateRect
Page 369 of 938
TcxControlChildComponent Methods TcxControlChildComponent Legend In TcxControlChildComponent CreateEx Destroy
Page 370 of 938
TcxControl Properties TcxControl Legend In TcxControl ActiveCanvas BorderStyle Bounds Canvas ClientBounds FocusOnClick Hint IsDesigning IsDestroying IsFocused IsLoading LookAndFeel PopupMenu Derived from TControl Hint ShowHint {$IFDEF DELPHI14} Touch
{$ENDIF}
Page 371 of 938
TcxControlChildComponent Properties TcxControlChildComponent Legend In TcxControlChildComponent Control IsDestroying IsLoading
Page 372 of 938
TcxLockedStateImageOptions Properties TcxLockedStateImageOptions Legend In TcxLockedStateImageOptions AssignedValues Color Effect Enabled Font ShowText Text
Page 373 of 938
Hierarchy TComponent | TcxControlChildComponent
Page 374 of 938
Hierarchy TCustomControl | TcxControl
Page 375 of 938
Hierarchy TPersistent | TcxLockedStateImageOptions
Page 376 of 938
Hierarchy IUnknown | IcxExportProgress
Page 377 of 938
IcxExportProgress.OnProgress IcxExportProgress Enables you to track the progress of the export operation and abort it if necessary. procedure OnProgress(Sender: TObject; Percent: Integer); Description When implemented, this method is called multiple times during the export operation, enabling you to track its progress and abort it if necessary by calling Abort within the method. Method parameters (their number, types, and order) match the parameters of the TcxProgressEvent type. Refer to the type description for information about the method parameters. The following code example shows how to implement a form (called TfrmMyExportProgress) that implements the IcxExportProgress interface to track the progress of an export operation. The OnProgress method implementation updates the caption of a label located on the form with the progress of the operation and aborts it if certain conditions are met. uses
..., cxExport; type
// ... TfrmMyExportProgress = class(TForm, IcxExportProgress)
// ... private
// IcxExportProgress procedure OnProgress(Sender: TObject; Percent: Integer); end;
implementation procedure TfrmMyExportProgress.OnProgress(Sender: TObject; Percent: Integer); begin Label1.Caption := IntToStr(Percent) + '% done.'; if <Your Condition> then
Abort; end;
A TfrmExportProgress object can be passed as the AHandler parameter to export methods, including ExportGridTo~, cxExportPivotGridTo~, cxExportSchedulerTo~, cxExportTLTo~, and cxExportVGTo~.
Page 378 of 938
IcxExportProgress Methods IcxExportProgress Legend In IcxExportProgress OnProgress
Page 379 of 938
TcxGeometryObject.OnChange TcxGeometryObject Occurs after changing this object’s settings. type TNotifyEvent = procedure(Sender: TObject) of object; property OnChange: TNotifyEvent; Description Descendant classes raise this event when their settings change.
Page 380 of 938
TcxMargin.All TcxMargin Applies the same margin on all sides. property All: Integer; Description Priority depends on the order of change. Change All and the Left, Top, Right, Bottom will change accordingly. If you then change an individual margin, the All property will be automatically set to –1. All = 30
Page 381 of 938
TcxMargin.Bottom TcxMargin Specifies the bottom margin of the element. property Bottom: Integer; Description Sets the Bottom margin of the TcxMargin class.
Page 382 of 938
TcxMargin.Left TcxMargin Specifies the left margin of the element. property Left: Integer; Description Sets the Left margin of the TcxMargin class.
Page 383 of 938
TcxMargin.Margin TcxMargin Exposes margin settings via a TRect structure. property Margin: TRect; Description Margin stores the Left, Top, Right and Bottom values in the corresponding TRect fields.
Page 384 of 938
TcxMargin.Right TcxMargin Specifies the right margin of the element. property Right: Integer; Description Sets the Right margin of the TcxMargin class.
Page 385 of 938
TcxMargin.Top TcxMargin Specifies the top margin of the element. property Top: Integer; Description Sets the Top margin of the TcxMargin class.
Page 386 of 938
TdxSizeDouble type A TSize type equivalent with the double-precision floating-point Height and Width dimensions. Unit cxGeometry type TdxSizeDouble = record Height: Double; Width: Double; end;
Page 387 of 938
TcxGeometryObject Events TcxGeometryObject Legend In TcxGeometryObject OnChange
Page 388 of 938
TcxMargin Events TcxMargin Legend Derived from TcxGeometryObject OnChange
Page 389 of 938
TcxMargin Properties TcxMargin Legend In TcxMargin All Bottom Left Margin Right Top
Page 390 of 938
Hierarchy TPersistent | TcxOwnedPersistent | TcxGeometryObject
Page 391 of 938
Hierarchy TPersistent | TcxOwnedPersistent | TcxGeometryObject | TcxMargin
Page 392 of 938
Hierarchy IUnknown | IcxImageCollectionListener
Page 393 of 938
IcxImageCollectionListener.ImageCollectionChanged IcxImageCollectionListener Notifies a registered listener that the TcxImageCollection component has been changed. procedure ImageCollectionChanged; Description Implement the ImageCollectionChanged method to perform specific actions after changes have been made to the image collection.
Page 394 of 938
IcxImageCollectionListener.ImageCollectionDestroyed IcxImageCollectionListener Notifies a registered listener that the TcxImageCollection component is destroyed. procedure ImageCollectionDestroyed; Description When an image collection is being destroyed, the listener’s reference is automatically removed from the image collection’s list of registered listeners. Implement the ImageCollectionDestroyed method to perform specific actions when the image collection is being destroyed.
Page 395 of 938
TcxCanvas.Brush TcxCanvas Determines the color and pattern for filling graphical shapes and backgrounds. property Brush: TBrush;
Description Set the Brush property to specify the color and pattern to use when drawing the background or filling in graphical shapes. The value of the Brush property is a TBrush object. Set the properties of the TBrush object to specify the color and pattern or the bitmap to use when filling in spaces on a canvas. Note: When assigning the Brush property, all source brush settings are copied to the TcxCanvas brush.
Page 396 of 938
TcxCanvas.Canvas TcxCanvas Provides access to the standard VCL canvas. property Canvas: TCanvas;
Description The TcxCanvas class is a VCL canvas wrapper that extends its facilities with a set of drawing methods. The TcxCanvas class uses a TCanvas class instance to store data. This canvas can be accessed by the Canvas property. ReadOnly Property
Page 397 of 938
TcxCanvas.CopyMode TcxCanvas Specifies the manner in which a graphical image is copied onto a canvas. property CopyMode: TCopyMode; Description Set CopyMode to affect the manner in which graphical images are drawn on a canvas. The CopyMode property value represents a type of Raster Operation. Use raster operations to achieve a variety of effects when rendering an image. For example, merged images and making parts of a bitmap transparent by combining multiple images with different raster operations. Although there are 256 possible raster operations, only 15 are worth mentioning here. The following table explains their meanings:
The following table shows the results of some raster operations:
Value Meaning
cmBlackness Fills the destination using the color associated with index 0 in the physical palette. (This color is black for the default physical palette.)
cmDstInvert Inverts the destination bitmap colors and ignores the source.
cmMergeCopy Merges the colors of the source with the brush color of the destination by using the Boolean AND operator.
cmMergePaint Combines the inverted source bitmap with the image on the canvas by using the Boolean OR operator.
cmNotSrcCopy Copies the inverted source bitmap onto a canvas.
cmNotSrcErase Combines the image on the canvas and the source bitmap by using the Boolean OR operator and inverts the result.
cmPatCopy Copies the source pattern onto a canvas.
cmPatInvert Combines the source pattern with the image on the canvas using the Boolean XOR operator.
cmPatPaint Combines the inverted source bitmap with the source pattern by using the Boolean OR operator. Combines the result of this operation with the image on a canvas by using the Boolean OR operator.
cmSrcAnd Combines the image on the canvas and the source bitmap by using the Boolean AND operator.
cmSrcCopy Copies the source bitmap onto a canvas.
cmSrcErase Inverts the image on the canvas and combines the result with the source bitmap by using the Boolean AND operator.
cmSrcInvert Combines the image on the canvas and the source bitmap by using the Boolean XOR operator.
cmSrcPaint Combines the image on the canvas and the source bitmap by using the Boolean OR operator.
cmWhiteness Fills the destination using the color associated with index 1 in the physical palette. (This color is white for the default physical palette.)
Value Source Destination Result
Page 398 of 938
* - Depends on the system palette settings. The CopyMode property value is used internally by the CopyRect and Draw methods to achieve various effects while drawing.
cmBlackness*
cmDstInvert
cmMergeCopy
cmMergePaint
cmNotSrcCopy
cmNotSrcErase
cmPatCopy
cmPatInvert
cmPatPaint
cmSrcAnd
cmSrcCopy
cmSrcErase
cmSrcInvert
cmSrcPaint
cmWhiteness*
Page 399 of 938
TcxCanvas.CopyRect TcxCanvas Copies a portion of an image from one canvas onto another. procedure CopyRect(const Dest: TRect; ACanvas: TCanvas; const Source: TRect); Description Use the CopyRect method to transfer a portion of an image from one canvas to the image of the TCanvas object. The Dest parameter specifies the rectangle on the canvas where the source image will be copied. The ACanvas parameter specifies the canvas with the source image. The Source parameter specifies the rectangle bounding the portion of the source canvas to be copied. So if you need to copy an image from one TcxCanvas to another, you should implement the following code: //the following code copies ARect2 from cxCanvas2 to ARect1 of cxCanvas1
cxCanvas1.CopyRect(ARect1, cxCanvas2.Canvas, ARect2); The copy uses the mode specified by the CopyMode property.
Page 400 of 938
TcxCanvas.Draw TcxCanvas Renders a graphic object on a canvas. procedure Draw(X, Y: Integer; Graphic: TGraphic); Description Call the Draw method to draw a graphic object (specified by the Graphic parameter) on a canvas. The position to place the upper-left corner of the object is specified by the X and Y parameters. Graphics can be bitmaps, icons, or metafiles. If it is a TBitmap object, the bitmap is rendered using the CopyMode property value.
Page 401 of 938
TcxCanvas.DrawComplexFrame TcxCanvas Draws a two-color border around a rectangle. procedure DrawComplexFrame(const R: TRect; ALeftTopColor, ARightBottomColor: TColor; ABorders: TcxBorders = [bLeft, bTop, bRight, bBottom]; ABorderWidth: Integer = 1);
Description The DrawComplexFrame method draws a two-color border around a rectangle. The ALeftTopColor parameter provides the color for the top and left border sides and the ARightBottomColor parameters - for the bottom and right. Optionally, you can specify the border width. You can also determine which border sides to draw (the ABorders and ABorderWidth parameters). This method lets you draw a complex border in a single operation (without having to manipulate pen and brush colors or to perform excessive calculations.) The following code shows how to draw grid view's Group By box in 3D style using the DrawComplexFrame method (The code is implemented in the TcxCustomGridTableView.OnCustomDrawPartBackground event handler): procedure TViewTableSimpleDemoMainForm.cxgFilmsDBTableViewCustomDrawPartBackground(
Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo; var ADone: Boolean); var
FOldColor: TColor; FBounds: TRect; begin if (AViewInfo is TcxGridGroup ByBoxViewInfo) then begin
FOldColor := ACanvas.Brush.Color; ACanvas.Brush.Color := clBtnFace; FBounds := AViewInfo.Bounds; ACanvas.FillRect(AViewInfo.Bounds); ACanvas.DrawComplexFrame(FBounds, clWhite, cl3DDkShadow, cxBordersAll, 1); InflateRect(FBounds, -1, -1); ACanvas.DrawComplexFrame(FBounds, cl3DLight, clGray, cxBordersAll, 1); ACanvas.Brush.Color := FOldColor; ADone := True; end; end;
The following images illustrate the above code. Standard drawing (the above code is NOT implemented):
Custom drawing (the above code is implemented):
Page 402 of 938
TcxCanvas.DrawEdge TcxCanvas Draws one or more edges of a rectangle. procedure DrawEdge(const R: TRect; ASunken, AOuter: Boolean; ABorders: TcxBorders = [bLeft, bTop, bRight, bBottom]);
Description The DrawEdge method draws one or more edges of the rectangle specified by the R parameter. Set the ASunken parameter to True to draw the edge sunken, otherwise it will be drawn raised. If the AOuter parameter is True, the edge will be drawn outside the rectangle, otherwise, it is drawn within the rectangle. To specify the edges to draw, you should use the ABorders parameter. The following code shows how to draw edges above and below the grid view's Group By box caption using the DrawEdge method (The code is implemented in the TcxCustomGridTableView.OnCustomDrawPartBackground event handler): procedure TViewTableSimpleDemoMainForm.cxgFilmsDBTableViewCustomDrawPartBackground(
Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo; var ADone: Boolean); var
FBounds: TRect; begin
FBounds := AViewInfo.Bounds; ACanvas.FillRect(FBounds); InflateRect(FBounds, 0, -9);
ACanvas.DrawEdge(FBounds, True, True, [bTop, bBottom]); ADone := True; end;
Page 403 of 938
TcxCanvas.DrawFocusRect TcxCanvas Draws a rectangle using the style indicating that it has focus. procedure DrawFocusRect(const R: TRect);
Description The DrawFocusRect method draws a rectangle using the style indicating that it has focus. Since the DrawFocusRect method is an XOR function, calling it for the second time with the same rectangle removes the rectangle from screen. The image below shows the grid view's Group By box caption surrounded by the focus rectangle:
Page 404 of 938
TcxCanvas.DrawImage TcxCanvas Renders a graphic object from a VCL image list on a canvas. procedure DrawImage(Images: TImageList; X, Y, Index: Integer; Enabled: Boolean = True);
Description Call the Draw method to draw a graphic object on a canvas using an image from the Images image list. The Index parameter provides the reference to the image used. The X and Y parameters provide the location of the upper-left corner of the image within the canvas. If you want your image to be drawn as disabled, set the Enabled parameter to False. The image below shows the grid view's the enabled image drawn in the Group By box:
and that shows the disabled one:
Page 405 of 938
TcxCanvas.DrawText TcxCanvas See Also Draws formatted text within a specific rectangle. Overloaded Variants type
TAlignment = (taLeftJustify, taRightJustify, taCenter); TcxAlignmentVert = (vaTop, vaBottom, vaCenter); TcxRotationAngle = (ra0, raPlus90, raMinus90, ra180); procedure DrawTexT(const Text: string; R: TRect; Flags: Integer; Enabled: Boolean; ARotationAngle: TcxRotationAngle); overload; procedure DrawText(const Text: string; R: TRect; Flags: Integer; Enabled: Boolean = True); overload; procedure DrawTexT(const Text: string; R: TRect; AAlignmentHorz: TAlignment; AAlignmentVert: TcxAlignmentVert; AMultiLine, AShowEndEllipsis: Boolean); overload;
Description The DrawText method formats the text specified via the Text parameter and draws it within a rectangle (the R parameter) based on formatting and painting options provided via other method parameters. These options include:
l Tab expansion, character justification, line break insertion, etc. Each formatting option corresponds to a flag value in Flags (these options are described in detail below);
l Rotation angle (ARotationAngle); l Enabled state (Enabled). False corresponds to the disabled state.
The DrawText method has three overloaded variants. The first overloaded variant has the most comprehensive parameter list. This variant is called by two other variants, which simply pass their Text and R parameter values unchanged and convert other parameter values to corresponding Flags, ARotationAngle, and Enabled settings. The second overloaded variant always paints the text horizontally, with no rotation (it calls the first overloaded variant with ra0 passed as the ARotationAngle parameter). The third overloaded variant calls the second variant, setting the cxAlignLeft, cxAlignRight, cxAlignHCenter, cxAlignTop, cxAlignBottom, cxAlignVCenter, cxSingleLine, cxWordBreak, and cxShowEndEllipsis flags based on the AAlignmentHorz, AAlignmentVert, AMultiLine, and AShowEndEllipsis parameter values, and passing them as the Flags parameter. The third overloaded variant always paints the text as enabled. The DrawText method uses the selected font, text color, and background color to draw text within a canvas. Unless the cxDontClip flag is used, the method clips the text so that it does not appear outside the specified rectangle. The text will be automatically wrapped into multiple lines (if necessary) unless the cxSingleLine flag is set. If the selected font is too large for the rectangle, the method does not automatically reduce the font size.
Value Meaning
cxAlignBottom Justifies the text to the bottom of the rectangle. This value must be combined with cxSingleLine. cxAlignBottom corresponds to the DT_BOTTOM flag value of the DrawText API function.
cxAlignCenter Centers the text within the rectangle. This value represents a combination of the cxAlignHCenter and cxAlignVCenter values.
cxAlignHCenter Centers the text horizontally within the rectangle. This value corresponds to the DT_CENTER flag value of the DrawText API function.
cxAlignLeft Aligns the text to the left. This value corresponds to the DT_LEFT flag value of the DrawText API function.
Page 406 of 938
The following code shows how to custom paint the grid view's Group By box caption using the DrawText method. The code represents a TcxCustomGridTableView.OnCustomDrawPartBackground event handler which wraps the caption into multiple lines
cxAlignRight Aligns the text to the right. This value corresponds to the DT_RIGHT flag value of the DrawText API function.
cxAlignTop Top-justifies the text (single line only). This value corresponds to the DT_TOP flag value of the DrawText API function.
cxAlignVCenter Centers the text vertically (single line only). This value corresponds to the DT_VCENTER flag value of the DrawText API function.
cxDontBreakChars If not set, a partially visible last text line is not displayed. Otherwise, the text is displayed as is. This value applies only in combination with the cxWordBreak flag value. The case when the cxDontBreakChars flag value is not set corresponds to calling the DrawText API function with the DT_EDITCONTROL flag value.
cxDontClip Draws without clipping. The DrawText method runs somewhat faster when cxDontClip is used. This value corresponds to the DT_NOCLIP flag value of the DrawText API function.
cxDontPrint Calculates the rectangle required to display the entire text. The text won’t be drawn. This value corresponds to the DT_CALCRECT flag value of the DrawText API function.
cxExpandTabs Expands tab characters. The default number of characters per tab is eight. This value corresponds to the DT_EXPANDTABS flag value of the DrawText API function.
cxShowEndEllipsis Characters at the end of the text are replaced with ellipses, if necessary, so that it fits into the specified rectangle. This value corresponds to the DT_END_ELLIPSIS flag value of the DrawText API function.
cxShowPrefix Switches on the processing of prefix characters. If cxShowPrefix is set, the DrawText method interprets the mnemonic-prefix character & as a directive to underscore the character that follows, and the mnemonic-prefix characters && as a directive to print a single &. Otherwise, this processing is deactivated. Setting cxShowPrefix turns off the DT_NOPREFIX flag value of the DrawText API function.
cxShowPathEllipsis Characters in the middle of the text are replaced with an ellipsis, if necessary, so that it fits into the specified rectangle. If the string contains backslash (\) characters, the DrawText preserves as much text as possible after the last backslash. cxShowPathEllipsis corresponds to the DT_PATH_ELLIPSIS flag value of the DrawText API function.
cxSingleLine Displays the text in a single line only. Carriage returns and line feeds do not break the line. This value corresponds to the DT_SINGLELINE flag value of the DrawText API function.
cxWordBreak Breaks words. Lines are automatically broken between words if a word extends past the edge of the rectangle specified by the R parameter. A carriage return-line feed sequence also breaks the line. Use the cxDontBreakChars flag value to specify whether a partially visible last line of the text is displayed. cxWordBreak corresponds to the DT_WORDBREAK flag value of the DrawText API function.
Page 407 of 938
and displays the end ellipsis if it does not fit into the Group By box. procedure TViewTableSimpleDemoMainForm.cxgFilmsDBTableViewCustomDrawPartBackground(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridCellViewInfo; var ADone: Boolean); var
FBounds: TRect; begin
FBounds := AViewInfo.Bounds; ACanvas.FillRect(FBounds); InflateRect(FBounds, -150, -4); OffsetRect(FBounds, 140, 0); ACanvas.DrawText('This is the Group By Box. ' + 'It is used to group records by field values. ' + 'Drag a column header here to group by that field.', FBounds, cxWordBreak or cxShowEndEllipsis);
ADone := True; end;
The result is shown on the image below:
Page 408 of 938
TcxCanvas.FillRect TcxCanvas Fills a specified rectangle on a canvas. Overloaded Variants type TcxViewParams = record Bitmap: TBitmap; Color: TColor; Font: TFont; TextColor: TColor; end; procedure FillRect(const R: TRect; AColor: TColor); overload; procedure FillRect(const R: TRect; ABitmap: TBitmap = nil; AExcludeRect: Boolean = False); overload; procedure FillRect(const R: TRect; const AParams: TcxViewParams; AExcludeRect: Boolean = False); overload;
Description Call this method to fill the rectangular region passed as the R parameter. The region is filled including the top and left sides of the rectangle, but excluding the bottom and right edges. The first overloaded variant assigns AColor to the canvas’s Brush.Color property and fills the region using these brush settings. The second overloaded variant fills the region with the image passed as the ABitmap parameter. If it is omitted or the image is not specified (nil is passed), the region is filled using the current brush settings. Pass True as the AExcludeRect parameter to exclude the region from repainting. The third overloaded variant uses the color and bitmap specified by the corresponding properties of a TcxViewParams object passed as the AParams parameter. This variant assigns AParams.Color to the canvas’s Brush.Color property and calls the second overloaded variant with R, AParams.Bitmap, and AExcludeRect passed as the respective method parameters.
Page 409 of 938
TcxCanvas.Font TcxCanvas Specifies the font to use when writing text on a canvas. property Font: TFont; Description Set the Font property to specify the font to use for writing text on a canvas. The Font property value is a TFont object. Set the properties of the TFont object to specify the font face, color, size, style etc. Note: When assigning the Font property, all source font settings are copied to the TcxCanvas font.
Page 410 of 938
TcxCanvas.FontHeight TcxCanvas Returns the height of a string rendered in the current font in pixels. function FontHeight(AFont: TFont): Integer;
Description Call this function to determine the height of a string written with the font passed as the AFont parameter. Other image elements such as lines, boxes, or additional text lines can then be positioned to accommodate the text height.
Page 411 of 938
TcxCanvas.FrameRect TcxCanvas Draws a border around a rectangle. procedure FrameRect(const R: TRect; Color: TColor = clDefault; ALineWidth: Integer = 1; ABorders: TcxBorders = cxBordersAll);
Description This method draws a color border around a rectangle. The Color parameter specifies the border color. Optionally you can specify the border sides to draw and the border width (the ABorders and ALineWidth parameters).
Page 412 of 938
TcxCanvas.Handle TcxCanvas Specifies the handle for a canvas. property Handle: HDC; Description The Handle property specifies the Windows GDI handle to the device context for a canvas. Read the Handle property to supplement the drawing services provided by the TcxCanvas object with API calls that require a handle to the device context. Most of the Windows GDI calls require a device context handle. ReadOnly Property
Page 413 of 938
TcxCanvas.LineTo TcxCanvas Draws a line from the current pen position to the point specified by X and Y and updates the pen position. procedure LineTo(X, Y: Integer);
Description Use the LineTo method to draw a line from the current pen position up to, but not including the point specified by the X and Y coordinates. The LineTo method changes the pen position’s value to (X,Y). To set the pen position's value without drawing a line, use the MoveTo method. Note: If the current pen does not have a style of psSolid, the line is drawn with the background specified by the current brush.
Page 414 of 938
TcxCanvas.MoveTo TcxCanvas Changes the current drawing position to the point specified by the X and Y coordinates. procedure MoveTo(X, Y: Integer);
Description Use the MoveTo method to set the pen position before calling the LineTo method.
Page 415 of 938
TcxCanvas.Pen TcxCanvas Specifies the pen type the canvas uses for drawing lines and outlining shapes. property Pen: TPen; Description Set the Pen property to specify the pen to use for drawing lines and outlining shapes on a canvas. The Pen property value is a TPen object. Set the properties of the TPen object to specify the color, style, width, and mode of the pen. Note: When assigning the Pen property, all source pen settings are copied to the TcxCanvas pen.
Page 416 of 938
TcxCanvas.Pixels TcxCanvas Specifies the color of pixels within the current clipping rectangle of a canvas. property Pixels[X, Y: Integer]: TColor; Description Read the Pixels property to learn the color of the drawing surface at a specific pixel position within the current clipping region. If the position is outside the clipping rectangle, the Pixels property value is -1. Write the Pixels property to change the color of individual pixels within the drawing surface. Note: Getting and setting the Pixels property is a very slow operation. Use it only when it is unavoidable.
Page 417 of 938
TcxCanvas.Polygon TcxCanvas Draws a series of lines on a canvas to create a filled shape. procedure Polygon(const Points: array of TPoint);
Description Use the Polygon method to draw a closed, many-sided shape on a canvas, using the current pen. Having completed the shape, the Polygon method fills it with the help of the current brush. The Points parameter is an array of points that specify the vertices of a polygon. The last point is always connected to the first point automatically, so you do not need to supply the first one twice. To draw a polygon without filling it, use the Polyline method.
Page 418 of 938
TcxCanvas.Polyline TcxCanvas Draws a series of connected lines with the current pen. procedure Polyline(const Points: array of TPoint);
Description Use the Polyline method to connect a set of points on a canvas. If you specify only two points, the Polyline method draws a single line. The Points parameter is an array of points to be connected. To draw a polygon and fill it with the current brush, use the Polygon method instead.
Page 419 of 938
TcxCanvas.TextExtent TcxCanvas Returns the width and height of a string in pixels in pixels, rendered in the current font. Overloaded Variants function TextExtent(const Text: string): TSize; procedure TextExtent(const Text: string; var R: TRect; Flags: Integer);
Description Use the TextExtent method to determine the space a string will occupy within an image. Overload 1: Other image elements such as lines, boxes, or additional text lines can be positioned to accommodate the size of text. The TextExtent method returns the width and height of the rectangle that bounds the supplied text within a canvas. Overload 2: The Flags parameter specifies the string format. The flags are the same as in the DrawText method. The R parameter returns the text’s bounding rectangle. Other image elements such as lines, boxes, or additional text lines can be positioned to accommodate the size of the text.
Page 420 of 938
TcxCanvas.TextHeight TcxCanvas Returns the height of a string in pixels, rendered in the current font. function TextHeight(const Text: string): Integer;
Description Use the TextHeight method to determine the height a string will occupy within an image. Other image elements such as lines, boxes, or additional text lines can be positioned to accommodate the text’s height. To determine the text’s width, use the TextWidth property. Also, see the TextExtent method for enhanced text measuring facilities.
Page 421 of 938
TcxCanvas.TextWidth TcxCanvas Returns the width of a string rendered in the current font (in pixels). function TextWidth(const Text: string): Integer;
Description Use the TextWidth method to determine the length a string will occupy within an image. Other graphical image elements such as lines or additional strings can be positioned to accommodate the text’s width. To determine the text’s height, use the TextHeight property. Also, see the TextExtent method for enhanced text measuring facilities.
Page 422 of 938
TcxImageCollectionItems.Add TcxImageCollectionItems Adds a new TcxImageCollectionItem instance to the end of the collection. function Add: TcxImageCollectionItem; Description The Add method returns a newly created instance. At design time, you can easily create collection images and load images to them via the TcxImageCollection component’s context menu. Refer to the component’s description to learn about this capability.
Page 423 of 938
TcxImageCollectionItems.FindItemByID TcxImageCollectionItems Returns the TcxImageCollectionItem instance by its unique identifier. function FindItemByID(ID: Integer): TcxImageCollectionItem; Description The FindItemByID method returns nil, if the ID doesn’t match the corresponding identifier in the collection.
Page 424 of 938
TcxImageCollectionItems.FindItemByName TcxImageCollectionItems Searches for the TcxImageCollectionItem instance by its name. function FindItemByName(const AName: string; out AItem: TcxImageCollectionItem): Boolean; Description If an instance was found, the FindItemByName method assigns it to AItem and returns True. Otherwise, nil is assigned and False is returned. AName specifies the name of an instance to match. AItem returns the found instance.
Page 425 of 938
TcxImageCollectionItems.Insert TcxImageCollectionItems Inserts a new TcxImageCollectionItem instance into the collection at the position specified by the zero-based Index parameter. function Insert(Index: Integer): TcxImageCollectionItem; Description The Insert method returns a newly created instance. At design time, you can easily create collection images and load images to them via the TcxImageCollection component’s context menu. Refer to the component’s description to learn about this capability.
Page 426 of 938
TcxImageCollectionItems.Items TcxImageCollectionItems Provides zero-based indexed access to the images in the TcxImageCollection component. property Items[Index: Integer]: TcxImageCollectionItem; Description Use the Items property to obtain an image at the position specified by the zero-based Index parameter.
Page 427 of 938
TcxImageCollectionItem.ClientRect TcxImageCollectionItem See Also Returns the image’s bounding rectangle, in pixels. property ClientRect: TRect; ReadOnly Property
Page 428 of 938
TcxImageCollectionItem.Draw TcxImageCollectionItem Paints the image on ACanvas. Overloaded Variants procedure Draw(ACanvas: TCanvas; X, Y: Integer); procedure Draw(ACanvas: TCanvas; const R: TRect; AStretch: Boolean = True; ASmoothResize: Boolean = False; AEnabled: Boolean = True); Description The second overload paints the image within the R rectangle, using image adjustment options. ACanvas specifies the canvas on which the image will be painted. X and Y specify the coordinates of the image’s top-left corner. R specifies the rectangle within which the image will be painted. AStretch specifies whether the image will fit R. Set AStretch to True, to zoom the image within R boundaries. Otherwise, it will be centered in the rectangle. ASmoothResize specifies whether antialiasing will be applied when the image is zoomed in. Set ASmoothResize to True, to smooth the resulting image, when it’s scaled to the size of R. AEnabled specifies whether the image is painted in full color or grayed out. Set AEnabled to False, to paint the image grayed out.
Page 429 of 938
TcxImageCollectionItem.Height TcxImageCollectionItem See Also Returns the image’s height, in pixels. property Height: Integer; ReadOnly Property
Page 430 of 938
TcxImageCollectionItem.Picture TcxImageCollectionItem See Also Specifies the image to be stored in the image collection. property Picture: TPicture; Description The stored image can be of any format that is supported by the TPicture type. At design time, you can easily create collection images and load images to them via the TcxImageCollection component’s context menu. Refer to the component’s description to learn about this capability.
Page 431 of 938
TcxImageCollectionItem.Tag TcxImageCollectionItem Specifies the value that can be used for image identification purposes. type TcxTag = Longint; property Tag: TcxTag; The default value of the Tag property is 0.
Page 432 of 938
TcxImageCollectionItem.Width TcxImageCollectionItem See Also Returns the image’s width, in pixels. property Width: Integer; ReadOnly Property
Page 433 of 938
TcxImageCollection.AddListener TcxImageCollection See Also Registers a listener to be notified when the component changes. procedure AddListener(AListener: IcxImageCollectionListener);
Page 434 of 938
TcxImageCollection.Count TcxImageCollection Returns the number of images that are stored in the component. property Count: Integer; ReadOnly Property
Page 435 of 938
TcxImageCollection.Draw TcxImageCollection Paints the image on ACanvas. Overloaded Variants procedure Draw(ACanvas: TCanvas; X, Y, AIndex: Integer); procedure Draw(ACanvas: TCanvas; const R: TRect; AIndex: Integer; AStretch: Boolean = True; ASmoothResize: Boolean = False; AEnabled: Boolean = True); Description The second overload paints the image within the R rectangle, using image adjustment options. ACanvas specifies the canvas on which the image will be painted. X and Y specify the coordinates of the image’s top-left corner. R specifies the rectangle within which the image will be painted. AIndex specifies the image’s index in the image collection. AStretch specifies whether the image will fit R. Set AStretch to True, to zoom the image within R boundaries. Otherwise, it will be centered in the rectangle. ASmoothResize specifies whether antialiasing will be applied when the image is zoomed in. Set ASmoothResize to True, to smooth the resulting image, when it’s scaled to the size of R. AEnabled specifies whether the image is painted in full color or grayed out. Set AEnabled to False, to paint the image grayed out.
Page 436 of 938
TcxImageCollection.Items TcxImageCollection Specifies the collection of images that are stored in the component. property Items: TcxImageCollectionItems;
Page 437 of 938
TcxImageCollection.RemoveListener TcxImageCollection Deletes a listener from the collection of listeners registered using the AddListener method. procedure RemoveListener(AListener: IcxImageCollectionListener);
Page 438 of 938
TcxImageList.AlphaBlending TcxImageList Determines whether alpha channel information is used to draw images. property AlphaBlending: Boolean;
Description By default this property is set to True, which indicates that images are drawn using alpha channel information. Otherwise, this information is ignored as with the standard TImageList.Draw method. Call the Draw method to paint images on a specific canvas. Note: To improve performance in Windows XP and Windows Vista, put a TXPManifest component onto a form, and set the AlphaBlending property to False.
Page 439 of 938
TcxImageList.BeginUpdate TcxImageList Postpones sending notifications about changes to the image list until the matching EndUpdate method is called. procedure BeginUpdate;
Description To improve performance and prevent all listeners from refreshing their contents during bulk updates, enclose the code performing the updates within BeginUpdate/EndUpdate blocks. To cancel the last BeginUpdate method call and enable further updates, call CancelUpdate. Ensure that every call to BeginUpdate has a corresponding call to the EndUpdate method (or to CancelUpdate). Note: The OnChange event won’t fire unless all EndUpdate methods are executed.
Page 440 of 938
TcxImageList.CancelUpdate TcxImageList Enables sending notifications on image list changes after the BeginUpdate method was called. procedure CancelUpdate;
Description To improve performance and prevent all listeners from refreshing their contents during bulk updates to the image list, enclose the code performing the updates within BeginUpdate/EndUpdate blocks. If no changes are made, you can call the CancelUpdate method to enable further updates. Unlike EndUpdate, the CancelUpdate method does not send notifications to all listeners – it simply cancels the last BeginUpdate method call. Ensure that every call to BeginUpdate has a corresponding call to the EndUpdate method (or to CancelUpdate).
Page 441 of 938
TcxImageList.CompressData TcxImageList Specifies whether stored images are to be compressed. property CompressData: Boolean; Description Set the CompressData property to True, to reduce the size of the stored images. The default value of the CompressData property is False.
Page 442 of 938
TcxImageList.CopyImages TcxImageList Copies a set of images from the AImageList to the current image list. procedure CopyImages(AImageList: TCustomImageList; AStartIndex: Integer = 0; AEndIndex: Integer = -1);
Description A range of images is determined by the AStartIndex and AEndIndex parameters, which correspond to the indexes of the first and last images in the range. When the AEndIndex parameter is set to a negative value or exceeds the index of the last image, the last image is considered to be the last element in the range.
Page 443 of 938
TcxImageList.Draw TcxImageList Paints the image specified by the AIndex parameter on ACanvas. Overloaded Variants type
TDrawingStyle = (dsFocus, dsSelected, dsNormal, dsTransparent); TImageType = (itImage, itMask); procedure Draw(ACanvas: TCanvas; X, Y, AIndex: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; AEnabled: Boolean = True); overload; procedure Draw(ACanvas: TCanvas; const ARect: TRect; AIndex: Integer; AStretch: Boolean = True; ASmoothResize: Boolean = False; AEnabled: Boolean = True); overload;
Description The first overloaded variant allows you to draw the image or its associated transparency mask (as specified by the AImageType parameter) using various drawing styles. The ADrawingStyle parameter specifies the drawing style of the image to be painted. Pass False as the AEnabled parameter to paint the image grayed out. The X and Y parameters specify the location where the top-left corner of the image should appear on ACanvas. The second overloaded variant represents an extended version of the first one, and allows you to paint the image within the ARect rectangle using image adjustment options. Set the AStretch parameter to True to scale the image to stretch or fit ARect. Otherwise, the image will be centered within this rectangle. Set the ASmoothResize parameter to True to smooth the resulting image when it’s scaled to the size of ARect. As with the first overloaded variant, the AEnabled parameter indicates whether the image is painted grayed out or not.
Page 444 of 938
TcxImageList.EndUpdate TcxImageList Enables sending notifications about changes to the image list locked by the matching BeginUpdate method. procedure EndUpdate(AForceUpdate: Boolean = True);
Description To improve performance and prevent all listeners to image list changes from refreshing their contents during bulk updates, enclose the code performing the updates within BeginUpdate/EndUpdate blocks. If no changes are made, you can call the CancelUpdate method, thus enabling further updates. Unlike EndUpdate, the CancelUpdate method does not send notifications to all listeners – it simply cancels the last BeginUpdate method call. Ensure that every call to BeginUpdate has a corresponding call to the EndUpdate method (or to CancelUpdate). Note: The OnChange event won’t fire unless all EndUpdate methods are executed. To prevent this event from being raised after the last EndUpdate method is executed, pass False as its AForceUpdate parameter.
Page 445 of 938
TcxImageList.GetImage TcxImageList See Also Retrieves the bitmap of an image by its index in the current image list. procedure GetImage(AIndex: Integer; AImage: TBitmap);
Description The index of the image to retrieve is passed as the AIndex parameter. A value of –1 indicates that the bitmap of all images in the image list will be retrieved. The image bitmap is returned via the AImage parameter. Note: To retrieve bitmaps of 32-bit images stored in the TcxImageList, call the GetImage or GetImageInfo method, instead of the GetBitmap method.
Page 446 of 938
TcxImageList.GetImageInfo TcxImageList See Also Retrieves the bitmap and transparency mask bitmap of a specific image or all images in the current image list. Overloaded Variants procedure GetImageInfo(AIndex: Integer; AImage, AMask: TBitmap); overload; class procedure GetImageInfo(AHandle: HIMAGELIST; AIndex: Integer; AImage, AMask: TBitmap); overload;
Description The index of the image is passed as the AIndex parameter. A value of –1 indicates that bitmap information about all images in the image list will be retrieved. An image bitmap and transparency mask bitmap are returned via the AImage and AMask parameters. The second overloaded variant requires the handle of the image list that is passed as the AHandle parameter. Use the Handle property to get the handle of the current image list. Note: To retrieve bitmaps of 32-bit images stored in the TcxImageList, call the GetImage or GetImageInfo method, instead of the GetBitmap method.
Page 447 of 938
TcxImageList.GetMask TcxImageList See Also Retrieves the transparency mask bitmap of a specific image. procedure GetMask(AIndex: Integer; AMask: TBitmap);
Description The index of the image is passed as the AIndex parameter. A value of –1 indicates that the transparency mask bitmap of all images in the image list will be retrieved. The transparency mask bitmap is returned via the AMask parameter.
Page 448 of 938
TcxViewParams type Specifies attributes controlling the object’s appearance. Unit cxGraphics type TcxViewParams = record Bitmap: TBitmap; Color: TColor; Font: TFont; TextColor: TColor; end; Description The Bitmap field denotes the object’s background bitmap; The Color field denotes the object’s background color; The Font field denotes the font of the output text in the object; The TextColor field denotes the output text color in the object and should be used instead of the TFont.Color property.
Page 449 of 938
TcxImageList Events TcxImageList Legend Derived from TCustomImageList OnChange
Page 450 of 938
TcxCanvas Methods TcxCanvas Legend In TcxCanvas CopyRect Draw DrawComplexFrame DrawEdge DrawFocusRect DrawImage DrawText FillRect FontHeight FrameRect LineTo MoveTo Polygon Polyline TextExtent TextHeight TextWidth
Page 451 of 938
TcxImageCollection Methods TcxImageCollection Legend In TcxImageCollection AddListener Draw RemoveListener
Page 452 of 938
TcxImageCollectionItem Methods TcxImageCollectionItem Legend In TcxImageCollectionItem Draw
Page 453 of 938
TcxImageCollectionItems Methods TcxImageCollectionItems Legend In TcxImageCollectionItems Add FindItemByID FindItemByName Insert Derived from TcxComponentCollection Add BeginUpdate Clear Delete EndUpdate FindItemByID IndexOf Insert Remove Update
Page 454 of 938
TcxImageList Methods TcxImageList Legend In TcxImageList BeginUpdate CancelUpdate CopyImages EndUpdate Draw GetImage GetImageInfo GetMask Derived from TDragImageList BeginDrag DragLock DragMove DragUnlock EndDrag GetHotSpot HideDragImage Initialize SetDragImage ShowDragImage Derived from TCustomImageList Add AddIcon AddImages AddMasked Assign Clear Create CreateSize Delete Destroy Draw DrawOverlay FileLoad GetBitmap GetIcon GetImageBitmap GetInstRes GetMaskBitmap GetResource HandleAllocated Insert InsertIcon InsertMasked Move Overlay RegisterChanges
Page 455 of 938
Replace ReplaceIcon ReplaceMasked ResInstLoad ResourceLoad UnRegisterChanges
Page 456 of 938
TcxCanvas Properties TcxCanvas Legend In TcxCanvas Brush Canvas CopyMode Font Handle Pen Pixels
Page 457 of 938
TcxImageCollection Properties TcxImageCollection Legend In TcxImageCollection Count Items
Page 458 of 938
TcxImageCollectionItem Properties TcxImageCollectionItem Legend In TcxImageCollectionItem ClientRect Height Picture Tag Width
Page 459 of 938
TcxImageCollectionItems Properties TcxImageCollectionItems Legend In TcxImageCollectionItems Items Derived from TcxComponentCollection Count Items
Page 460 of 938
TcxImageList Properties TcxImageList Legend In TcxImageList AlphaBlending CompressData Derived from TDragImageList DragCursor Dragging Derived from TCustomImageList AllocBy BkColor BlendColor
{$IFDEF DELPHI12} ColorDepth
{$ENDIF} Count DrawingStyle Handle Height ImageType Masked ShareImages Width
Page 461 of 938
IcxImageCollectionListener Methods IcxImageCollectionListener Legend In IcxImageCollectionListener ImageCollectionChanged ImageCollectionDestroyed
Page 462 of 938
Hierarchy TObject | TcxCanvas
Page 463 of 938
Hierarchy TPersistent | TcxComponentCollection | TcxImageCollectionItems
Page 464 of 938
Hierarchy TcxComponentCollectionItem | TcxImageCollectionItem
Page 465 of 938
Hierarchy TComponent | TcxImageCollection
Page 466 of 938
Hierarchy TDragImageList | TcxImageList
Page 467 of 938
Hierarchy TObject | TcxCustomLookAndFeelPainter
Page 468 of 938
TcxLanguages.Add TcxLanguages Adds a language to the collection. function Add: TcxLanguage; Description The method adds an empty item to the collection and returns it. To specify a language for this newly created item, use the TcxLanguage.LocaleID property.
Page 469 of 938
TcxLanguages.GetLanguageByName TcxLanguages See Also Finds a language with a specified name and returns this language's index within the collection. function GetLanguageByName(AName: string): Integer; Description AName specifies the language name to be found. This value is compared to the TcxLanguage.Name property when searching. If the specified name is not found, the method returns –1.
Page 470 of 938
TcxLanguages.Items TcxLanguages Provides indexed access to languages. property Items[Index: Integer]: TcxLanguage; Description Index specifies the language’s position in the collection.
Page 471 of 938
TcxLanguage.Dictionary TcxLanguage Contains localized strings. property Dictionary: TStrings; Description Each string contains a pair of a resource string identifier and the corresponding resource string value delimited by the equals sign delimiter.
Page 472 of 938
TcxLanguage.LocaleID TcxLanguage Specifies the language’s locale ID, according to the Windows system specification. property LocaleID: Cardinal; Description To learn the locale id that corresponds to the required language, refer to the list of supported locales at the following address: https://msdn.microsoft.com/en-US/goglobal/bb964664.aspx. This information is also available in the MSDN Library.
Page 473 of 938
TcxLanguage.Name TcxLanguage See Also Returns a locale name. property Name: string; Description While the LocaleID property specifies the locale in a numeric format, the Name property provides the corresponding display name containing a language, and a country or a region (this value is provided for some languages). This value is used for display purposes. ReadOnly Property
Page 474 of 938
TcxLocalizer.Active TcxLocalizer See Also Specifies whether the localization component is active. property Active: Boolean; Description Set the Active property to True, to activate the localizer. If active, the localizer implicitly loads resource strings from a store based on the StorageType setting. If a language has been dynamically changed at runtime, the localizer is automatically deactivated (the Active property is set to False). Set the Active property to True, to reactivate the localizer. The default value of the Active property is False.
Page 475 of 938
TcxLocalizer.FileName TcxLocalizer Specifies the resource strings file’s location. property FileName: TFileName; Description The resource strings file is an INI file created using the Localizer Editor tool. The file’s content is separated into sections by languages. Each section is started with the language identifier represented as a decimal value in square brackets. In the section, each line contains a pair of a resource string identifier and the corresponding value delimited by the equals sign. If the file’s content has been modified at runtime, invoke the LoadFromFile method to update the component’s cache. Use this property to supply a different file with translations. If resource strings for the current language haven't been specified, default values will be used instead.
Page 476 of 938
TcxLocalizer.Language TcxLocalizer Specifies the application’s language. property Language: string; Description Use this property to translate the application's UI into another language. If resource strings for this language haven't been specified, default values will be used instead. The Language, LanguageIndex and Locale properties are interchangeable, and mutually influence each other. If a language has been dynamically changed at runtime, the localizer is automatically deactivated (the Active property is set to False). Set the Active property to True, to reactivate the localizer.
Page 477 of 938
TcxLocalizer.LanguageIndex TcxLocalizer See Also Specifies the application’s language by its index in the Languages collection. property LanguageIndex: Integer; Description The LanguageIndex, Language and Locale properties are interchangeable, and mutually influence each other. If a language has been dynamically changed at runtime, the localizer is automatically deactivated (the Active property is set to False). Set the Active property to True, to reactivate the localizer.
Page 478 of 938
TcxLocalizer.Languages TcxLocalizer Specifies a set of languages that will be available for localization. property Languages: TcxLanguages; Description Use this property to determine languages that are available for localization, and access a language which will be used for localization. You can also use this property to add a language dynamically via code. ReadOnly Property
Page 479 of 938
TcxLocalizer.LoadFromFile TcxLocalizer See Also Reads localized strings from the specified file into the localization component’s cache. procedure LoadFromFile(const AFileName: TFileName = ''); Description The localization component stores localized strings in the INI file. Use the SaveToFile method, for instance, to create these files. AFileName specifies the source file.
Page 480 of 938
TcxLocalizer.LoadFromResource TcxLocalizer See Also Reads localized strings from a specified resource file into the localization component’s cache. procedure LoadFromResource(AHandle: Cardinal); Description Use the LoadFromResource method if a RES file is not compiled to an executable file, but to a DLL. This method is used as an alternate to the Active property. AHandle specifies the source file’s handle. Note: Starting from Build v2011 vol 1.7, there is no need to call the LoadFromResource method if the Active property is set to
True.
Page 481 of 938
TcxLocalizer.LoadFromStream TcxLocalizer Reads localized strings from the specified stream into the localization component’s cache. procedure LoadFromStream(AStream: TStream); Description Localized strings are stored in the INI format. Use the SaveToStream method, for instance, to persist localized strings with streams. AStream specifies the source stream.
Page 482 of 938
TcxLocalizer.Locale TcxLocalizer See Also Specifies the application’s locale, according to the Windows system specification. property Locale: Cardinal; Description To learn the locale id that corresponds to the required language, refer to the list of supported locales at the following address: http://www.microsoft.com/globaldev/reference/lcid-all.mspx. This information is also available in the MSDN install. Use this property to translate the application's UI to another language. The Locale, Language and LanguageIndex properties are interchangeable, and mutually influence each other. If a language has been dynamically changed at runtime, the localizer is automatically deactivated (the Active property is set to False). Set the Active property to True, to reactivate the localizer.
Page 483 of 938
TcxLocalizer.OnTranslate TcxLocalizer See Also Allows you to customize localized strings when a new localization is about to be performed. type TcxLocalizerTranslateEvent = procedure(const AResStringName: string; var AResStringValue: string; var AHandled: Boolean) of object; property OnTranslate: TcxLocalizerTranslateEvent; Description When an application's UI is being translated, this event fires for each individual resource string, allowing you to substitute default translations. AResStringName specifies the resource string identifier. AResStringValue specifies the resource string value. AHandled specifies whether the default behavior is required. Set AHandled to True, to prevent the addition of a default localized string.
Page 484 of 938
TcxLocalizer.SaveToFile TcxLocalizer Writes localized strings from the localization component’s cache to the specified file. procedure SaveToFile(const AFileName: TFileName; AIsAnsiSaveFormat: Boolean); Description The SaveToFile method saves localized strings in the INI file. AFileName specifies the target file. AIsAnsiSaveFormat specifies whether strings will be saved as ANSI or Unicode encoded. Set AIsAnsiSaveFormat to True, to store the data in a ANSI encoded file.
Page 485 of 938
TcxLocalizer.SaveToStream TcxLocalizer Writes localized strings from the localization component’s cache to the specified stream. procedure SaveToStream(AStream: TStream; AIsAnsiSaveFormat: Boolean); Description The SaveToStream method saves localized strings in the INI format. AStream specifies the target stream. AIsAnsiSaveFormat specifies whether strings are to be ANSI or Unicode encoded. Set AIsAnsiSaveFormat to True, to stream the data as ANSI encoded.
Page 486 of 938
TcxLocalizer.StorageType TcxLocalizer Specifies the type of the storage that contains localized resource strings. type TcxLocalizerStorageType = (lstResource, lstIni); property StorageType: TcxLocalizerStorageType; Description Use the StorageType property to specify the type of the storage (RES or INI) that will be used for the translation.
Page 487 of 938
TcxLocalizer.Translate TcxLocalizer Performs localization. procedure Translate; Description The Translate method is automatically invoked if a localizer’s language has been changed (see the localizer’s Locale, Language and LanguageIndex properties). Since the Translate method generates the OnTranslate event, invoke this method directly if you need to customize localized strings, or load localized strings from an alternate storage.
Page 488 of 938
TcxLocalizerStorageType type See Also Enumerates storage types for localized resource strings. Unit cxLocalization TcxLocalizerStorageType = (lstResource, lstIni); Description Values include: Value Meaning
lstResource Localized resource strings are loaded from a RES file.
lstIni Localized resource strings are loaded from an INI file.
Page 489 of 938
TcxLocalizer Events TcxLocalizer Legend In TcxLocalizer OnTranslate
Page 490 of 938
TcxLanguages Methods TcxLanguages Legend In TcxLanguages Add GetLanguageByName
Page 491 of 938
TcxLocalizer Methods TcxLocalizer Legend In TcxLocalizer LoadFromFile LoadFromResource LoadFromStream SaveToFile SaveToStream Translate
Page 492 of 938
TcxLanguage Properties TcxLanguage Legend In TcxLanguage Dictionary LocaleID Name
Page 493 of 938
TcxLanguages Properties TcxLanguages Legend In TcxLanguages Items
Page 494 of 938
TcxLocalizer Properties TcxLocalizer Legend In TcxLocalizer Active FileName Language LanguageIndex Languages Locale StorageType
Page 495 of 938
Hierarchy TCollection | TcxLanguages
Page 496 of 938
Hierarchy TCollectionItem | TcxLanguage
Page 497 of 938
Hierarchy TComponent | TcxLocalizer
Page 498 of 938
Hierarchy IUnknown |
Page 499 of 938
cxDefaultUseSkins global constant Determines the default value of the TdxSkinController.UseSkins property. Unit cxLookAndFeels cxDefaultUseSkins = True;
Page 500 of 938
cxIsTouchModeEnabled global constant See Also Determines whether Touch mode is enabled in an application. Unit cxLookAndFeels cxIsTouchModeEnabled: Boolean = cxDefaultIsTouchModeEnabled;
Description The default value of this constant is specified by the cxDefaultIsTouchModeEnabled global constant.
Page 501 of 938
cxUseSkins global constant See Also Determines whether skin support is enabled in an application. Unit cxLookAndFeels cxUseSkins: Boolean = cxDefaultUseSkins;
Description The default value of this constant is specified by the cxDefaultUseSkins global constant.
Page 502 of 938
RootLookAndFeel Function Provides access to the root look and feel at runtime. Unit cxLookAndFeels function RootLookAndFeel: TcxLookAndFeel;
Description The RootLookAndFeel method allows you to access to the root look and feel at runtime. The root look and feel is a TcxLookAndFeel class instance that is created on application startup. The default values of the root look & feel’s Kind, NativeStyle, and SkinName properties are specified by the cxDefaultLookAndFeelKind, cxDefaultLookAndFeelNativeStyle, and cxDefaultLookAndFeelSkinName global constants, respectively. TcxControl descendants allow you to set their own look and feel. The control’s look and feel is also a TcxLookAndFeel class instance that can be accessed via the control’s LookAndFeel property. You can also customize the root look and feel via the TcxLookAndFeelController and TdxSkinController components.
Page 503 of 938
IcxLookAndFeelNotificationListener.GetObject IcxLookAndFeelNotif icationListener Returns the object implementing this interface. function GetObject: TObject;
Description The GetObject method implementing this interface is usually a TcxLookAndFeel or TcxLookAndFeelController class instance.
Page 504 of 938
IcxLookAndFeelNotificationListener.MasterLookAndFeelChanged IcxLookAndFeelNotif icationListener Notifies all current look and feel listeners that its kind or native style property has changed. type
TcxLookAndFeelValue = (lfvKind, lfvNativeStyle, lfvSkinName); TcxLookAndFeelValues = set of TcxLookAndFeelValue; procedure MasterLookAndFeelChanged(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues);
Description The MasterLookAndFeelChanged method is called every time the Kind, NativeStyle, or SkinName property of the current look and feel changes. This method notifies all current look and feel listeners. A listener is a TcxControl descendant whose MasterLookAndFeel property is set to the current look and feel. If this property is not set, the TcxControl descendant listens to the root look and feel. To determine what properties of the master look and feel has changed, use the AChangedValues parameter. Note: The look and feel properties of the TcxControl descendants override the master look and feel property settings.
Page 505 of 938
IcxLookAndFeelNotificationListener.MasterLookAndFeelDestroying IcxLookAndFeelNotif icationListener Notifies all current look and feel listeners that it is being destroyed. procedure MasterLookAndFeelDestroying(Sender: TcxLookAndFeel);
Description The MasterLookAndFeelDestroying method is called on current look and feel destruction. To access the root look and feel at design time, you should use the TcxLookAndFeelController component. This component notifies all current look and feel listeners. A listener is a TcxControl control descendant whose MasterLookAndFeel property is set to the current look and feel. If this property is not set, the TcxControl descendant listens to the root look and feel. After the master root look and feel is destroyed, the TcxControl descendant becomes the root look and feel listener. The root look and feel cannot be destroyed. Note: The look and feel properties of TcxControl descendants override the master look and feel property settings.
Page 506 of 938
TcxLookAndFeelController.BeginUpdate TcxLookAndFeelController Prevents any DevExpress controls whose look and feel settings are influenced by the current controller, from being updated until the EndUpdate method is called. procedure BeginUpdate;
Description Each time you modify the controller’s Kind, NativeStyle, or SkinName property, the controller initiates complete control repainting to reflect these changes. If you need to change several properties at once, a sequence of appearance updates occurs. To postpone these updates, enclose code that modifies property values within the BeginUpdate/EndUpdate method blocks. The BeginUpdate method postpones updates. To apply the changes made, you should call the EndUpdate method. Ensure that every call to BeginUpdate has a corresponding call to the EndUpdate method, even if an exception occurs.
Page 507 of 938
TcxLookAndFeelController.Create TcxLookAndFeelController Creates and initializes a TcxLookAndFeelController class instance. procedure Create(AOwner: TComponent); override;
Description Use the Create method to instantiate a look and feel controller. Controllers added in the form designer are created automatically.
Page 508 of 938
TcxLookAndFeelController.Destroy TcxLookAndFeelController Destroys an instance of TcxLookAndFeelController class. procedure Destroy; override;
Description Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TcxLookAndFeelController reference is not nil, and only then calls Destroy.
Page 509 of 938
TcxLookAndFeelController.EndUpdate TcxLookAndFeelController Enables updates to any DevExpress controls whose look and feel settings are influenced by the current controller, after a call to the BeginUpdate method. procedure EndUpdate;
Description Each time you modify the controller’s Kind, NativeStyle, or SkinName property, the controller initiates complete control repainting to reflect these changes. If you need to change several properties at once, a sequence of appearance updates occurs. To postpone these updates, enclose code that modifies property values within the BeginUpdate/EndUpdate method blocks. The BeginUpdate method postpones updates. To apply the changes made, you should call the EndUpdate method. Ensure that every call to BeginUpdate has a corresponding call to the EndUpdate method, even if an exception occurs.
Page 510 of 938
TcxLookAndFeelController.Kind TcxLookAndFeelController See Also Specifies the default look for TcxControl descendants and how they visually respond to user actions (focus, mouse move, clicks, etc.) within the current application. type
TcxLookAndFeelKind = (lfFlat, lfStandard, lfUltraFlat, lfOffice11); property Kind: TcxLookAndFeelKind;
Description The NativeStyle and SkinName properties have a higher priority than the Kind property. The LookAndFeel.Kind property value of TcxControl descendants overrides the Kind property. You can enclose code that modifies the Kind, and/or NativeStyle, and/or SkinName property values within the BeginUpdate/EndUpdate method blocks to postpone the immediate repainting of DevExpress controls, whose look and feel settings are influenced by the current controller. The default value of the Kind property is cxDefaultLookAndFeelKind.
Page 511 of 938
TcxLookAndFeelController.NativeStyle TcxLookAndFeelController See Also Determines whether TcxControl descendants within the current application use the native windows paint style by default. property NativeStyle: Boolean;
Description The NativeStyle property has a higher priority than the Kind or SkinName property. The LookAndFeel.NativeStyle property value of TcxControl descendants overrides the NativeStyle property. You can enclose code that modifies the Kind, and/or NativeStyle, and/or SkinName property values within the BeginUpdate/EndUpdate method blocks to postpone the immediate repainting of DevExpress controls, whose look and feel settings are influenced by the current controller. The default value of the NativeStyle property is cxDefaultLookAndFeelNativeStyle.
Page 512 of 938
TcxLookAndFeelController.Reset TcxLookAndFeelController Reverts look and feel settings to their default values. procedure Reset; virtual;
Description This method calls the Reset method of the root look and feel settings.
Page 513 of 938
TcxLookAndFeelController.SkinName TcxLookAndFeelController See Also Specifies the name of a skin to be applied to all TcxControl descendants within the current application by default. type TdxSkinName = type string; property SkinName: TdxSkinName;
Description If this property is set to ‘UserSkin’, you need to provide a skin to be applied by the controller. To accomplish this, call the dxSkinsUserSkinLoadFromFile, dxSkinsUserSkinLoadFromFileByIndex, dxSkinsUserSkinLoadFromStream, or dxSkinsUserSkinLoadFromStreamByIndex function to load a skin from a .SKINRES file saved in the Skin Editor or a stream containing skin data. The SkinName property has a higher priority than the Kind property, but it can be overridden by the NativeStyle property. The LookAndFeel.SkinName property value of TcxControl descendants overrides the SkinName property. You can enclose code that modifies the Kind, and/or NativeStyle, and/or SkinName property values within the BeginUpdate/EndUpdate method blocks to postpone the immediate repainting of DevExpress controls, whose look and feel settings are influenced by the current controller. The default value of the SkinName property is cxDefaultLookAndFeelSkinName.
Page 514 of 938
TcxLookAndFeelController.TouchMode TcxLookAndFeelController See Also Toggles the Touch mode in an application. property TouchMode: Boolean;
Description Set this property to True to enable the Touch mode in an application. Setting the property to False reverts all the size modifications made to DevExpress controls by enabling the Touch mode. The default value of the TouchMode property is specified by the cxDefaultIsTouchModeEnabled global constant.
Page 515 of 938
TcxLookAndFeel.AssignedValues TcxLookAndFeel Represents a set of assigned look and feel options. type
TcxLookAndFeelValue = (lfvKind, lfvNativeStyle, lfvSkinName); TcxLookAndFeelValues = set of TcxLookAndFeelValue; property AssignedValues: TcxLookAndFeelValues;
Description Changing a control’s Kind, NativeStyle, or SkinName properties sets the corresponding flag in the AssignedValues property. When a flag is set, it forces the control to use the corresponding option in the control’s LookAndFeel property. When a flag is not set or reset, the corresponding look and feel setting is obtained from the MasterLookAndFeel property (if set) or the cxDefaultLookAndFeelKind, cxDefaultLookAndFeelNativeStyle, and cxDefaultLookAndFeelSkinName global constants.
To reset the AssignedValues property, call the Reset method.
Value Description
lfvKind Corresponds to the control’s LookAndFeel.Kind property.
lfvNativeStyle Corresponds to the control’s LookAndFeel.NativeStyle property.
lfvSkinName Corresponds to the control’s LookAndFeel.SkinName property.
Page 516 of 938
TcxLookAndFeel.Create TcxLookAndFeel Creates an instance of the TcxLookAndFeel class and the list to hold potential listener controls. procedure Create(AOwner: TPersistent); ov e r r i de ;
Page 517 of 938
TcxLookAndFeel.Destroy TcxLookAndFeel Destroys an instance of the TcxLookAndFeel class. procedure Destroy; override;
Description This method does the following:
l notifies all listener controls via the IcxLookAndFeelNotificationListener.MasterLookAndFeelDestroying method; l destroys the list of listener controls; l destroys the TcxLookAndFeel class instance.
Page 518 of 938
TcxLookAndFeel.Kind TcxLookAndFeel See Also Determines how a control is painted. type
TcxLookAndFeelKind = (lfFlat, lfStandard, lfUltraFlat, lfOffice11); property Kind: TcxLookAndFeelKind;
Description The Kind property specifies the look of the control and how the control visually responds on user actions (focus, mouse move, clicks etc.). Generally the Kind property determines how the control is painted. Modifying this property sets the lfvKind flag in the AssignedValues property and raises the OnChanged event. The NativeStyle and SkinName properties have a higher priority than the Kind property. The default value of the Kind property is cxDefaultLookAndFeelKind.
Page 519 of 938
TcxLookAndFeel.MasterLookAndFeel TcxLookAndFeel Specifies the imported look and feel. property MasterLookAndFeel: TcxLookAndFeel;
Description Every DevExpress control can export its look and feel to other DevExpress controls. The MasterLookAndFeel property determines the imported look and feel of any DevExpress control. Any control that imports look and feel of the current control is a listener. It listens to changes within the current control via the IcxLookAndFeelNotificationListener interface. Note that a control only listens to its MasterLookAndFeel property when its AssignedValues property is not set. The IcxLookAndFeelNotificationListener interface listens for two events:
l Any look and feel property change via the MasterLookAndFeelChanged method. l The TcxLookAndFeel class instance destruction via the MasterLookAndFeelDestroying method.
Listener controls reflect all changes within the current control. If an imported TcxLookAndFeel class instance is destroyed, a listener control obtains its look and feel from the cxDefaultLookAndFeelKind, cxDefaultLookAndFeelNativeStyle, and cxDefaultLookAndFeelSkinName global constants.
Page 520 of 938
TcxLookAndFeel.NativeStyle TcxLookAndFeel See Also Determines whether to use the native windows style for control painting. property NativeStyle: Boolean;
Description Set this property to True to paint the control using the native windows style. Otherwise, the Kind or SkinName property specifies the paint style for the control.
Modifying the NativeStyle property sets the lfvNativeStyle flag in the AssignedValues property and raises the OnChanged event. The NativeStyle property has a higher priority than the Kind or SkinName property. Note: The NativeStyle property is currently only supported for the Windows® XP operating system. The default value of the NativeStyle property is cxDefaultLookAndFeelNativeStyle.
Page 521 of 938
TcxLookAndFeel.OnChanged TcxLookAndFeel Occurs on any property change of the TcxLookAndFeel class. Unit cxLookAndFeels type TcxLookAndFeelValue = (lfvKind, lfvNativeStyle, lfvSkinName); TcxLookAndFeelValues = set of TcxLookAndFeelValue; TcxLookAndFeelChangedEvent = procedure(Sender: TcxLookAndFeel; AChangedValues: TcxLookAndFeelValues) of object; property OnChanged: TcxLookAndFeelChangedEvent;
Description The OnChanged event occurs every time any property of the TcxLookAndFeel class is changed.
Page 522 of 938
TcxLookAndFeel.Painter TcxLookAndFeel Provides access to the control painter associated with the current look and feel option set. property Painter: TcxCustomLookAndFeelPainterClass;
ReadOnly Property
Page 523 of 938
TcxLookAndFeel.Reset TcxLookAndFeel See Also Resets look and feel properties. procedure Reset;
Description This method clears all flags in the AssignedValues property. For the root look and feel settings, this method also reverts the cxUseSkins, cxIsTouchModeEnabled, and dxSkinsUseImageSet global constants to their default values. As a result, the UseSkins, TouchMode, and UseImageSet properties of the look and feel controllers and skin controllers are reset as well.
Page 524 of 938
TcxLookAndFeel.SkinName TcxLookAndFeel See Also Specifies the name of a skin to be used for control painting. type TdxSkinName = type string; property SkinName: TdxSkinName;
Description Assigning an empty string to the SkinName property indicates that skin support is disabled for the control. Modifying the SkinName property sets the lfvSkinName flag in the AssignedValues property and raises the OnChanged event.
The SkinName property has a higher priority than the Kind property, but it can be overridden by the NativeStyle property. The default value of the SkinName property is cxDefaultLookAndFeelSkinName.
Page 525 of 938
TcxLookAndFeelKind type Determines the manner in which a control is painted. Unit cxLookAndFeels type
TcxLookAndFeelKind = (lfFlat, lfStandard, lfUltraFlat, lfOffice11); Description There are four kinds of control painting: Kind Description
lfFlat
lfStandard
lfUltraFlat
lfOffice11
Page 526 of 938
TcxLookAndFeel Events TcxLookAndFeel Legend In TcxLookAndFeel OnChanged
Page 527 of 938
TcxLookAndFeel Methods TcxLookAndFeel Legend In TcxLookAndFeel Create Destroy Reset
Page 528 of 938
TcxLookAndFeelController Methods TcxLookAndFeelController Legend In TcxLookAndFeelController BeginUpdate Create Destroy EndUpdate Reset
Page 529 of 938
TcxLookAndFeel Properties TcxLookAndFeel Legend In TcxLookAndFeel AssignedValues Kind MasterLookAndFeel NativeStyle Painter SkinName
Page 530 of 938
TcxLookAndFeelController Properties TcxLookAndFeelController Legend In TcxLookAndFeelController Kind NativeStyle SkinName TouchMode
Page 531 of 938
IcxLookAndFeelNotificationListener Methods IcxLookAndFeelNotif icationListener Legend In IcxLookAndFeelNotificationListener GetObject MasterLookAndFeelChanged MasterLookAndFeelDestroying
Page 532 of 938
Hierarchy TComponent |
Page 533 of 938
Hierarchy TcxInterfacedPersistent |
Page 534 of 938
Example TcxPropertiesStore.StoreTo The following example demonstrates how to use the TcxPropertiesStore component. Consider storing the Color property value of the cxStyle object. This object (cxTabStyle) is assigned to the RootLevelStyles.Tab property of a cxGrid control. The TcxPropertiesStore component does not allow you to save/restore sub-properties of the properties referring to TComponent descendants. So, saving the Color property of a cxStyle object needs a special approach. The following code shows the correct method of saving the Color property of the cxTabStyle style: //Delphi
//...
//setting the level tabs painting style to cxTabStyle cxGrid1.RootLevelStyles.Tab := cxTabStyle; with cxPropertiesStore1 do begin
//adding a reference to the cxGrid1 control into the Components collection with TcxPropertiesStoreComponent(Components.Add) do begin
Component := cxGrid1; //specifying the Properties.Add('RootLevelStyles.Tab'); end;
//adding a reference to cxTabStyle into the Components collection with TcxPropertiesStoreComponent(Components.Add) do begin
Component := cxTabStyle; //specifying the Color property for storing/restoring Properties.Add('Color'); end;
//setting the storage type to INI file
StorageType := stIniFile; //specifying the name of the INI file StorageName := 'c:\store.ini';
//saving information
StoreTo; end;
//...
//C++ Builder
//...
//setting the level tabs painting style to cxTabStyle
cxGrid1->RootLevelStyles->Tab = cxTabStyle; TcxPropertiesStoreComponent * APSComponent; //adding a reference to the cxGrid1 control into the Components collection
APSComponent = (TcxPropertiesStoreComponent *)cxPropertiesStore1->Components->Add(); APSComponent->Component = cxGrid1; //specifying the APSComponent->Properties->Add("RootLevelStyles.Tab");
//adding a reference to cxTabStyle into the Components collection
APSComponent = (TcxPropertiesStoreComponent *)cxPropertiesStore1->Components->Add(); APSComponent->Component = cxTabStyle; //specifying the Color property for storing/restoring APSComponent->Properties->Add("Color");
//setting the storage type to INI file
Page 535 of 938
cxPropertiesStore1->StorageType = stIniFile; //specifying the name of the INI file cxPropertiesStore1->StorageName = "c:\\store.ini";
//saving information
cxPropertiesStore1->StoreTo(); //...
The result of this code execution is shown below: [cxGrid1: TcxPropertiesStoreComponent] = RootLevelStyles.Tab=cxTabStyle [cxTabStyle: TcxPropertiesStoreComponent] = Color=15451300
The resulting file contains all the required information – the RootLevelStyles.Tab style object and the Color property value for that object.
Page 536 of 938
TcxPropertiesStoreComponent Object Hierarchy Properties Methods See Also Represents a reference to a component with properties stored by a TcxPropertiesStore object. Unit cxPropertiesStore TcxPropertiesStoreComponent = class(TcxInterfacedCollectionItem, IcxStoredObject, IcxStoredParent)
Description The TcxPropertiesStore component is used to save/restore published properties of components present on a form. Components with properties being saved/restored by a TcxPropertiesStore instance are accessible via its Components collection. Each item in this collection is a TcxPropeprtiesStoreComponent object. The Component property identifies the component whose properties are being saved/restored. To select the component’s properties to store/restore, see the Properties object. If the selected property represents a TPersistent descendant (like the Font property of a component), you can specify its sub-properties to store. A sub-property is delimited from the main property by a dot. For instance, you can insert the "Font.Style" string into the Properties list instead of "Font". This will save only the Style property of the TFont object associated with the Font property. If you specify the control’s Font property to store, all its published sub-properties (Charset, Color, Height, Name, Pitch, Size and Style) will be automatically saved. The TcxPropertiesStoreComponent class’s methods allow you to save/restore individual components from the Components collection to any type of supported storage (registry, INI file, stream).
Page 537 of 938
TcxPropertiesStoreComponents Object Hierarchy Properties See Also Represents a collection of references to the components whose properties are saved/restored by the TcxPropertiesStore component. Unit cxPropertiesStore TcxPropertiesStoreComponents = class(TOwnedCollection)
Description Each component with properties saved/restored by a TcxPropertiesStore component, is represented by a TcxPropertiesStoreComponent object. References to all stored components are contained within the Components collection. To add components in order to store/restore this collection at design time, do one of the following:
1. Use the PropertiesStore Editor. It allows the selecting of components and their properties by right-clicking elements within the list. In this case, the properties of the added item (Component and Properties) are initialized automatically.
2. In the Object Inspector, use the TcxCustomEditPropwertiesStore.Components property editor to manually initialize properties of the item being added.
Page 538 of 938
TcxCustomPropertiesStore.Active TcxCustomPropertiesStore See Also Determines whether the default save/restore functionality is enabled or disabled. property Active: Boolean;
Description Use this property to determine whether the component’s default functionality is enabled or disabled. If Active is set to False, then saving selected properties on closing the form and restoring upon its creation, are disabled. However, saving/restoring can be implemented by calling the StoreTo/RestoreFrom methods at any time. The default value of the Active property is True.
Page 539 of 938
TcxCustomPropertiesStore.Components TcxCustomPropertiesStore See Also Represents a collection of objects whose properties are stored to/restored from a storage. property Components: TcxPropertiesStoreComponents;
Description The TcxCustomPropertiesStore object is used to save and restore component settings using the storage specified by the StorageType and StorageName properties. Each component to be saved/restored has a corresponding item in the Components collection. Each element in this collection represents a TcxPropertiesStoreComponent object. The TcxPropertiesStoreComponent.Component property specifies a TComponent descendant whose properties must be stored/restored. To specify the component settings to store/restore, see the TcxPropertiesStoreComponent.Properties member.
Page 540 of 938
TcxCustomPropertiesStore.RestoreFrom TcxCustomPropertiesStore See Also Restores component settings from the currently specified storage. procedure RestoreFrom;
Description Use the RestoreFrom method to restore components' settings from the storage specified by the StorageName and StorageType properties. After calling this method the TcxPropertiesStore component restores settings of all components referenced within the Components collection. If the storage does not exist or if there are no components selected, this method does nothing. To save components' settings, use the StoreTo method.
Page 541 of 938
TcxCustomPropertiesStore.StorageName TcxCustomPropertiesStore See Also Identifies the storage used to save/restore selected component settings. property StorageName: string;
Description The TcxCustomPropertiesStore object is able to save component-specific information to three storage types: INI file, registry key and stream. All components available for saving/restoring can be accessed by the Components collection. Properties to save/restore are listed by the Properties property of each item within this collection. The StorageName property value interpretation varies depending on the storage type specified by the StorageType property.
Page 542 of 938
TcxCustomPropertiesStore.StorageStream TcxCustomPropertiesStore See Also Specifies the stream used for storing/restoring components' properties when StorageType is set to stStream. property StorageStream: TStream;
Description Use the StorageStream property to specify a stream (a descendant of the TStream class) used for storing/restoring components' properties. This property value is in effect only if the StorageType property value is stStream. If a TStream descendant instance is chosen as the storage, the StorageName property is not in effect.
Page 543 of 938
TcxCustomPropertiesStore.StorageType TcxCustomPropertiesStore See Also Specifies the type of storage used for saving/restoring components' properties. type
TcxStorageType = (stIniFile, stRegistry, stStream); property StorageType: TcxStorageType;
Description Use the StorageType property to specify the type of storage for saving/restoring components' properties. All components, selected for saving/restoring, can be accessed by the Components collection. Properties to save/restore are listed by the Properties property for each item within this collection. This property value affects the StorageName property value interpretation.
The default value of the StorageType property is stIniFile.
StorageType StorageName Interpretation
stIniFile The path and the name of the INI file.
stRegistry The registry key name. By default, this name specifies a key relative to the HKEY_CURRENT_USER root key. However, you can select another root key by adding a corresponding prefix to the name. All the supported prefixes and their associated root keys are listed below:
l HKCR. The HKEY_CLASSES_ROOT root key; l HKCU. The HKEY_CURRENT_USER root key; l HKLM. The HKEY_LOCAL_MACHINE root key; l HKU. The HKEY_USERS root key; l HKPD. The HKEY_PERFORMANCE_DATA root key; l HKCC. The HKEY_CURRENT_CONFIG root key; l HKDD. The HKEY_DYN_DATA root key.
For example, "HKCR\Software\cxPropertiesStore1" passed as the StorageName property value designates the HKEY_CLASSES_ROOT\Software\cxPropertiesStore1 registry key. Note: Due to the registry redirection used by 64-bit Windows, resulting physical locations of certain registry keys may differ from the specified names. Refer to the "Registry Redirector" MSDN article at https://msdn.microsoft.com/en-us/library/windows/desktop/aa384232(v=vs.85).aspx to learn more.
stStream The StorageName property is not in effect. Use the StorageStream property instead to specify a stream for storing/restoring components' properties.
Page 544 of 938
TcxCustomPropertiesStore.StoreTo TcxCustomPropertiesStore See Also Saves component settings to the current storage. procedure StoreTo(const AReCreate: Boolean = True);
Description Use the StoreTo method to save components' settings to the storage specified by the StorageName and StorageType properties. After calling this method, the TcxPropertiesStore component saves settings of all components referenced within the Components collection. If there are no components selected, this method does nothing. To restore components' settings, use the RestoreFrom method. The AReCreate parameter determines whether the selected storage is deleted and then re-created by the StoreTo method. If this parameter value is False, information is appended to the end of the existing storage.
Page 545 of 938
TcxPropertiesStoreComponents.ComponentItems TcxPropertiesStoreComponents See Also Provides indexed access to the components to store/restore. property ComponentItems[Index: Integer]: TcxPropertiesStoreComponent;
Description Use this property to access individual components within the Components collection of the PropertiesStore object. The Index parameter represents an item's position within the collection.
Page 546 of 938
TcxPropertiesStoreComponent.Component TcxPropertiesStoreComponent See Also Specifies a component whose properties are stored/restored by the PropertiesStore object. property Component: TComponent;
Description Each component with properties being saved/restored by a TcxPropertiesStore object, has a corresponding item within its Components collection. Items in this collection represent TcxPropertiesStoreComponent objects. The Component property of the TcxPropertiesStoreComponent object identifies the component whose settings are stored/restored. To select the component’s settings to save/restore, see the Properties attribute.
Page 547 of 938
TcxPropertiesStoreComponent.Properties TcxPropertiesStoreComponent See Also Specifies the properties of a component to store/restore using a storage. property Properties: TStrings;
Description Use the Properties property to specify which published properties of a component will be saved/restored. To specify the component itself, see the Component property. Note that only existing properties can be saved. If the component to store does not have a property with a name in the Properties list, this property is ignored. If a property relates to a TPersistent descendant, you can store its specific attributes. To specify the attributes to store, you need to add a string consisting of the property and attribute names delimited by a dot. For instance, if you wish to save only the Height sub-property of the Font property, you need to add the "Font.Height" string to the Properties string list. If you specify the control’s Font property to store, all its published sub-properties (Charset, Color, Height, Name, Pitch, Size and Style) will be automatically saved. Note that if your property references a TComponent descendant, only the object’s Name is saved in this case. See example for details.
Page 548 of 938
TcxPropertiesStoreComponent.RestoreFromIniFile TcxPropertiesStoreComponent See Also Restores the current component’s properties from an INI file. procedure RestoreFromIniFile(const AStorageName: string);
Description Use this method to restore the properties of the component specified by the Component property from an INI file. The properties to restore are specified by the Properties list. You can call the RestoreFromIniFile method even if the StorageType of the current TcxPropertiesStore instance is not set to stIniFile. The AStorageName parameter specifies the path and the name of the INI file used as a storage. If such a file does not exist, the RestoreFromIniFile method does nothing.
Page 549 of 938
TcxPropertiesStoreComponent.RestoreFromRegistry TcxPropertiesStoreComponent See Also Restores the current component’s properties from the registry. procedure RestoreFromRegistry(const AStorageName: string);
Description Use this method to restore the properties of the component specified by the Component property from the registry. The properties to restore are specified by the Properties list. You can call the RestoreFromRegistry method even if the StorageType of the current TcxPropertiesStore instance is not set to stRegistry. By default, the AStorageName parameter specifies the suffix to the HKEY_CURRENT_USER root key. So, the whole registry key, used as a storage, looks like HKEY_CURRENT_USER\ + the AStorageName parameter value. However, you can explicitly specify a specific root key as a prefix within the AStorageName parameter value to restore data from this root key. Refer to the TcxCustomPropertiesStore.StorageType property description to learn about supported prefixes.
Page 550 of 938
TcxPropertiesStoreComponent.RestoreFromStream TcxPropertiesStoreComponent See Also Restores the current component’s properties from a stream. procedure RestoreFromStream(const AStream: TStream);
Description Use this method to restore the properties of the component specified by the Component property from a stream. The properties to restore are specified by the Properties list. You can call the RestoreFromStream method even if the StorageType of the current TcxPropertiesStore instance is not set to stStream. The AStream parameter specifies the stream used as a storage.
Page 551 of 938
TcxPropertiesStoreComponent.StoreToIniFile TcxPropertiesStoreComponent See Also Saves the current component’s properties to an INI file. procedure StoreToIniFile(const AStorageName: string; const AReCreate: Boolean);
Description Use this method to save the properties of the component specified by the Component property to an INI file. The properties to store are specified by the Properties list. You can call the StoreToIniFile method even if the StorageType of the current TcxPropertiesStore instance is not set to stIniFile. The AStorageName parameter specifies the name and the path to the INI file used as the storage. The AReCreate parameter determines whether the INI file is deleted and created again with each call to this method. If this parameter value is False, information is appended to the end of the existing file.
Page 552 of 938
TcxPropertiesStoreComponent.StoreToRegistry TcxPropertiesStoreComponent See Also Saves the current component’s properties to the registry. procedure StoreToRegistry(const AStorageName: string; const AReCreate: Boolean);
Description Use this method to save the properties of the component specified by the Component property to the registry. The properties to store are specified by the Properties list. You can call the StoreToRegistry method even if the StorageType of the current TcxPropertiesStore instance is not set to stRegistry. By default, the AStorageName parameter specifies the suffix to the HKEY_CURRENT_USER registry key. So, the whole registry key, used as a storage, looks like HKEY_CURRENT_USER\ + the AStorageName parameter value. However, you can explicitly specify a specific root key as a prefix within the AStorageName parameter value to store data to this root key. Refer to the TcxCustomPropertiesStore.StorageType property description to learn about supported prefixes. The AReCreate parameter determines whether the registry key is deleted and created again with each call to this method. If this parameter value is False, information is appended to the existing key.
Page 553 of 938
TcxPropertiesStoreComponent.StoreToStream TcxPropertiesStoreComponent See Also Saves the current component’s properties to a stream. procedure StoreToStream(const AStream: TStream; const AReCreate: Boolean);
Description Use this method to save the properties of the component specified by the Component property to a stream (a TStream descendant). The properties to store are specified by the Properties list. You can call the StoreToStream method even if the StorageType of the current TcxPropertiesStore instance is not set to stStream. The AStream parameter identifies the TStream descendant used as the storage. The AReCreate parameter determines whether the storage stream is destroyed and created again with each call to this method. If this parameter value is False, information is appended to the end of the existing storage.
Page 554 of 938
TcxCustomPropertiesStore Methods TcxCustomPropertiesStore Legend In TcxCustomPropertiesStore RestoreFrom StoreTo
Page 555 of 938
TcxPropertiesStore Methods TcxPropertiesStore Legend Derived from TcxCustomPropertiesStore RestoreFrom StoreTo
Page 556 of 938
TcxPropertiesStoreComponent Methods TcxPropertiesStoreComponent Legend In TcxPropertiesStoreComponent RestoreFromIniFile RestoreFromRegistry RestoreFromStream StoreToIniFile StoreToRegistry StoreToStream
Page 557 of 938
TcxCustomPropertiesStore Properties TcxCustomPropertiesStore Legend In TcxCustomPropertiesStore Active Components StorageName StorageStream StorageType
Page 558 of 938
TcxPropertiesStore Properties TcxPropertiesStore Legend Derived from TcxCustomPropertiesStore Active Components StorageName StorageStream StorageType
Page 559 of 938
TcxPropertiesStoreComponent Properties TcxPropertiesStoreComponent Legend In TcxPropertiesStoreComponent Component Properties
Page 560 of 938
TcxPropertiesStoreComponents Properties TcxPropertiesStoreComponents Legend In TcxPropertiesStoreComponents ComponentItems
Page 561 of 938
Hierarchy TComponent | TcxCustomComponent | TcxCustomPropertiesStore
Page 562 of 938
Hierarchy TOwnedCollection |
Page 563 of 938
Hierarchy TCollectionItem | TcxInterfacedCollectionItem |
Page 564 of 938
Hierarchy TComponent | TcxCustomComponent | TcxCustomPropertiesStore | TcxPropertiesStore
Page 565 of 938
TcxScrollBar.Kind TcxScrollBar Specifies the scrollbar orientation. type
TScrollBarKind = (sbHorizontal, sbVertical); property Kind: TScrollBarKind;
Description Options include:
The default value of the Kind property is sbHorizontal.
Value Description Sample
sbHorizontal Corresponds to the horizontal scrollbar. sbVertical Corresponds to the vertical scrollbar.
Page 566 of 938
TcxScrollBar.LargeChange TcxScrollBar See Also Specifies the value to be added to or subtracted from the scrollbar’s value when the thumb moves a large distance. type
TScrollBarInc = 1..32767; property LargeChange: TScrollBarInc;
Description End-users can move the thumb a large distance by clicking the scrollbar’s shaft. This action (also called scrolling one page up or down) changes the thumb’s position by the LargeChange property value. Depending on the shaft part being clicked (before or after the thumb), the value is either subtracted from or added to the Position property value. You can handle the OnScroll event to respond to thumb scrolling. The default value of the LargeChange property is 1.
Page 567 of 938
TcxScrollBar.LookAndFeel TcxScrollBar Specifies the look and feel of the current scrollbar. property LookAndFeel: TcxLookAndFeel;
Description Use this property to access and adjust look and feel settings applied to the current scrollbar. To learn more, refer to the TcxLookAndFeel class description.
Page 568 of 938
TcxScrollBar.Max TcxScrollBar Specifies the upper limit of scrollbar values. property Max: Integer;
Description Use the Min and Max properties to define the range of scrollbar values (also called scrollable range). The Position property value always falls within the specified range. The default value of the Max property is 100.
Page 569 of 938
TcxScrollBar.Min TcxScrollBar Specifies the lower limit of scrollbar values. property Min: Integer;
Description Use the Min and Max properties to define the range of scrollbar values (also called scrollable range). The Position property value always falls within the specified range. The default value of the Min property is 0.
Page 570 of 938
TcxScrollBar.OnChange TcxScrollBar See Also Enables you to respond to scrollbar value changes. type TNotifyEvent = procedure(Sender: TObject) of object; property OnChange: TNotifyEvent;
Description This event is fired every time the Position property value changes in response to end-user thumb scrolling, or SetParams and SetScrollParams method calls, or via direct property updates. The Sender parameter provides access to the scrollbar that fired the event.
Page 571 of 938
TcxScrollBar.OnScroll TcxScrollBar See Also Enables you to respond to thumb scrolling. type
TScrollCode = (scLineUp, scLineDown, scPageUp, scPageDown, scPosition, scTrack, scTop, scBottom, scEndScroll); TScrollEvent = procedure(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer) of object; property OnScroll: TScrollEvent;
Description Handle this event to respond to end-user thumb scrolling and adjust the resulting scrollbar value accordingly. The Sender parameter provides access to the scrollbar that fired the event. The ScrollCode parameter identifies the end-user action that initiated thumb scrolling. Once thumb scrolling is finished, this parameter returns scEndScroll. The ScrollPos parameter contains a new Position property value to be assigned as the result of thumb scrolling. You can adjust this value as required. The following code example demonstrates how to handle the OnScroll event to cancel any end-user thumb scrolling based on a specific condition. // Delphi var
AStoredPos: Integer = -1; // ... procedure <Form>.<cxScrollBar>Scroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); begin if (ScrollCode <> scEndScroll) and (AStoredPos = -1) then
AStoredPos := cxScrollBar1.Position else if (<Your condition here>) and (ScrollCode = scEndScroll) then begin
ScrollPos := AStoredPos; AStoredPos := -1; end; end;
Page 572 of 938
TcxScrollBar.PageSize TcxScrollBar Specifies the thumb size. property PageSize: Integer;
Description Use this property to scale the thumb based on the scrollable range specified via the Min and Max properties. The thumb size indicates the ratio of the PageSize property value to the entire scrollable range. If a 0 is assigned to this property, the thumb assumes the size that is used in system scrollbars. The default value of the PageSize property is 0.
Page 573 of 938
TcxScrollBar.Position TcxScrollBar Specifies the current scrollbar value. property Position: Integer;
Description The Position property value is always synchronized with the thumb’s position. End-users can scroll the thumb to change the property value. You can handle the OnScroll and OnChange events to respond to thumb scrolling and Position updates. Note: The Position property value cannot fall outside the scrollable range specified via the Min and Max properties. If you assign a value outside the scrollable range, the property will be automatically assigned the closest range limit. The default value of the Position property is 0.
Page 574 of 938
TcxScrollBar.SetParams TcxScrollBar See Also Positions the thumb using specified parameters. procedure SetParams(APosition, AMin, AMax: Integer);
Description Method parameters specify the new Position, Min, and Max property values with which the method repaints the scrollbar. You can call the extended version of this method (SetScrollParams) if you need to modify the thumb’s size and optionally postpone scrollbar repainting.
Page 575 of 938
TcxScrollBar.SetScrollParams TcxScrollBar See Also Applies specified scrollbar parameters and optionally postpones scrollbar repainting. procedure SetScrollParams(AMin, AMax, APosition, APageSize: Integer; ARedraw: Boolean = True);
Description Method parameters specify the new Min, Max, Position, and PageSize property values. If you need to apply these new parameters without immediately repainting the scrollbar, pass False as the ARedraw parameter.
Page 576 of 938
TcxScrollBar.SmallChange TcxScrollBar See Also Specifies the value to be added to or subtracted from the scrollbar’s value when the thumb moves a small distance. type
TScrollBarInc = 1..32767; property SmallChange: TScrollBarInc;
Description End-users can move the thumb a small distance by clicking the scroll buttons. This action (also simply called scrolling) changes the thumb’s position by the SmallChange property value. Depending on the button being clicked (before or after the thumb), the value is either subtracted from or added to the Position property value. You can handle the OnScroll event to respond to thumb scrolling. The default value of the SmallChange property is 1.
Page 577 of 938
TcxScrollBar.UnlimitedTracking TcxScrollBar Specifies if dragging the thumb far out of the scrollbar automatically positions it at the closest limit. property UnlimitedTracking: Boolean;
Description If this property is set to True, end-users can drag the thumb to any point on the screen and the thumb will automatically scroll to the closest position to the mouse pointer. Otherwise, the scrolling will be performed only when the mouse pointer is moved within or near the scrollbar during the drag operation. The default value of the UnlimitedTracking property is False.
Page 578 of 938
TcxScrollBar Events TcxScrollBar Legend In TcxScrollBar OnChange OnScroll Derived from TWinControl OnEnter OnExit OnKeyDown OnKeyPress OnKeyUp Derived from TControl OnContextPopup OnDragDrop OnDragOver OnEndDock OnEndDrag OnStartDock OnStartDrag
Page 579 of 938
TcxScrollBar Methods TcxScrollBar Legend In TcxScrollBar SetParams SetScrollParams
Page 580 of 938
TcxScrollBar Properties TcxScrollBar Legend In TcxScrollBar Kind LargeChange LookAndFeel Max Min PageSize Position SmallChange UnlimitedTracking
Page 581 of 938
Hierarchy TCustomControl | TcxScrollBar
Page 582 of 938
TcxCustomStyleSheet.Caption TcxCustomStyleSheet Represents the caption of the style sheet. property Caption: string;
Description The Caption property specifies the style sheet caption. Use the caption according to your needs. For instance, it can be used to give a unique name to a style sheet in order to easily recognize it among other style sheets.
Page 583 of 938
TcxCustomStyleSheet.Create TcxCustomStyleSheet Creates an instance of the TcxCustomStyleSheet object. constructor Create(AOwner: TComponent); override;
Description Use the constructor to create a style sheet at runtime. The AOwner parameter is the owner of the TcxCustomStyleSheet object. TcxCustomStyleSheet is an abstract class. Use its descendants, such as TcxGridTableViewStyleSheet or TcxGridCardViewStyleSheet classes instead.
Page 584 of 938
TcxCustomStyleSheet.Destroy TcxCustomStyleSheet Removes the style sheet from memory. destructor Destroy; override;
Description Do not call the Destroy method directly. Call the Free method instead.
Page 585 of 938
TcxCustomStyleSheet.GetStyles TcxCustomStyleSheet Returns the collection of styles contained in the style sheet. function GetStyles: TcxCustomStyles;
Description The GetStyles method returns the collection of styles contained in the style sheet. The returned styles are specific for the control. To obtain the styles class, use the GetStylesClass method. To set the styles collection for the style sheet, use the SetStyles method. This allows you to set all style properties at once. For instance, if you want to create a style sheet specifying the same styles as a style collection, use the SetStyles method and pass the style collection to it as a parameter. Then you can save the style sheet to an INI file via the SaveStyleSheetsToIniFile procedure to save it for future use.
Page 586 of 938
TcxCustomStyleSheet.GetStylesClass TcxCustomStyleSheet Determines the class of styles within the style sheet. type TcxCustomStylesClass = class of TcxCustomStyles; function GetStylesClass: TcxCustomStylesClass; virtual;
Description Use this method to determine the style class. This is important when working with a styles collection. The control styles collections may vary (have different styles) and it is necessary to determine what style collection the style sheet contains.
Page 587 of 938
TcxCustomStyleSheet.SetStyles TcxCustomStyleSheet Sets the styles collection for the style sheet. procedure SetStyles(const Value: TcxCustomStyles);
Description The SetStyles method sets the style collection provided via the Value parameter. This allows you to set all style properties at once. For instance, if you want to create a style sheet specifying the same styles as a style collection, use the SetStyles method and pass the style collection to it as a parameter. Then you can save the style sheet to an INI file using the SaveStyleSheetsToIniFile procedure to save it for future use. To get the styles collection, use the GetStyles method.
Page 588 of 938
TcxCustomStyleSheet.StyleRepository TcxCustomStyleSheet Specifies the style repository containing the current style sheet. property StyleRepository: TcxStyleRepository;
Description The StyleRepository property specifies the style repository that contains the style sheet. Style sheets should be stored in repositories for proper design time handling. When created via the repository editor, style sheet is automatically placed within it.
Page 589 of 938
TcxCustomStyles.Assign TcxCustomStyles Copies one set of styles to another. procedure Assign(Source: TPersistent); override;
Description The Assign method copies the set of styles and style event handlers contained in the Source parameter to the current set of styles. Descendants of the TcxCustomStyles class override this method to copy styles specific to them. For instance, TcxGridBandStyles assigns its Background, Content, Header style properties and the OnGetHeaderStyle event handler. Use the Assign method when you need to copy styles provided by some style collection to the current one. This results in applying the same styles to different controls.
Page 590 of 938
TcxCustomStyles.Create TcxCustomStyles Creates a new instance of the TcxCustomStyles class. constructor Create(AOwner: TPersistent); override;
Description Create calls the inherited constructor and initializes object properties to their default values.
Page 591 of 938
TcxCustomStyles.Destroy TcxCustomStyles Destroys the current TcxCustomStyles object. destructor Destroy; override;
Description The destructor frees all resources allocated by the current object.
Page 592 of 938
TcxCustomStyles.StyleChanged TcxCustomStyles The method is called when any of attributes of the specified TcxCustomStyle object are changed. procedure StyleChanged(Sender: TcxCustomStyle);
Description Use this method to implement operations in response to style attribute changes. The Sender parameter identifies the style object whose attributes are changed.
Page 593 of 938
TcxCustomStyles.StyleRemoved TcxCustomStyles This method is called when the specified style is about to be destroyed. procedure StyleRemoved(Sender: TcxCustomStyle);
Description Implement the StyleRemoved method to react to style destroying. The Sender parameter defines the style object which is about to be destroyed.
Page 594 of 938
TcxCustomStyles.StyleSheet TcxCustomStyles See Also Specifies the style sheet for the current style collection. property StyleSheet: TcxCustomStyleSheet; Description The StyleSheet property specifies the style sheet for the style collection provided by the current TcxCustomStyles object. A style collection provides multiple attributes that control the appearance of different elements of a control. The TcxGridTableViewStyles collection, for instance, contains the Background, Content, Footer properties specifying styles for the view’s background, data cells and footer panel respectively. A corresponding style sheet (TcxGridTableViewStyleSheet) contains the same style attributes. If a style sheet, which is not set, is assigned to the style property within the style collection, the value of this property is determined by the corresponding property of the style sheet. Thus, a style sheet represents another collection of styles to be assigned to TcxCustomStyles. Once a style sheet is created and adjusted according to your preferences, it can be used in different applications over and over again. Style sheets can be saved to an INI file by the SaveStyleSheetsToIniFile procedure and can be loaded from this file via LoadStyleSheetsFromIniFile. Usually, you create a style sheet via a style repository of class TcxStyleRepository. At design time, you can create a style sheet via the style repository editor. It gives you the ability to create a style sheet of a specific type, adjust its properties, add predefined style sheets, load from and save style sheets to an INI file.
Page 595 of 938
TcxCustomStyle.AddListener TcxCustomStyle See Also Adds the specified listener to the notification list. procedure AddListener(AStyles: TcxCustomStyles); virtual;
Description When the attributes provided by the current style object are changed or the style object is destroyed, all the listeners within the notification list receive the corresponding notification. Call the AddListener method to add the listener specified by the AStyles parameter to this list. The listener represents a collection of style links for various component elements. To remove a listener, use the RemoveListener method.
Page 596 of 938
TcxCustomStyle.Create TcxCustomStyle Creates a new instance of the TcxCustomStyle class. constructor Create(AOwner: TComponent); override;
Description The constructor creates a new instance of the TcxCustomStyle class and initializes all properties to their default values. The AOwner specifies the component to own the created style. The owner disposes of the component when it is destroyed.
Page 597 of 938
TcxCustomStyle.Destroy TcxCustomStyle Destroys the current style object. destructor Destroy; override;
Description The destructor frees all resources allocated by the current style object. Also, it removes itself from a repository if one is assigned and sends the destroy notification to all its listeners.
Page 598 of 938
TcxCustomStyle.RemoveListener TcxCustomStyle See Also Removes the specified listener from the notification list. procedure RemoveListener(AStyles: TcxCustomStyles); virtual;
Description The RemoveListener method removes the listener specified by the AStyles parameter from the notification list. The listener (a collection of style links for various component elements) will no longer receive notifications when style attribute are changed or when the style object is destroyed. To add a listener to the notification list, use the AddListener method.
Page 599 of 938
TcxCustomStyle.RestoreDefaults TcxCustomStyle Restores default values of style attributes provided by the current style object. procedure RestoreDefaults; virtual;
Description RestoreDefaults is a virtual method overridden by TcxCustomStyle descendants in order to restore default style attribute values.
Page 600 of 938
TcxCustomStyle.StyleRepository TcxCustomStyle See Also Specifies the repository storing the current style object. property StyleRepository: TcxStyleRepository;
Description A repository is an object allowing you to manage a collection of individual styles. When a repository is destroyed, all styles it owns are also deleted. Assigning the StyleRepository property adds the current style to this repository.
Page 601 of 938
TcxStyleRepository.Clear TcxStyleRepository See Also Destroys all styles in the current repository. procedure Clear;
Description The Clear method disposes all TcxCustomStyle objects contained in the current repository object.
Page 602 of 938
TcxStyleRepository.ClearStyleSheets TcxStyleRepository Removes all style sheets from the style repository. procedure ClearStyleSheets; Description The ClearStyleSheets method removes all style sheets from the style repository. Note that the TcxStyle objects created along with the style sheets are not removed. Styles are disposed of when the style repository is destroyed.
Page 603 of 938
TcxStyleRepository.Count TcxStyleRepository See Also Gets the number of styles in the current repository. property Count: Integer;
Description The Count property identifies the number of styles in the Items collection. Use either CreateItem or CreateItemEx methods to add styles to the repository. ReadOnly Property
Page 604 of 938
TcxStyleRepository.Create TcxStyleRepository Creates a new instance of the TcxStyleRepository class. constructor Create(AOwner: TComponent); override;
Description The constructor creates and initializes a new instance of the TcxStyleRepository class. The AOwner parameter identifies the object to own the created repository. An owner is responsible for disposing objects it owns.
Page 605 of 938
TcxStyleRepository.CreateItem TcxStyleRepository See Also Creates a new style in a repository. type TcxCustomStyleClass = class of TcxCustomStyle; function CreateItem(AStyleClass: TcxCustomStyleClass): TcxCustomStyle; virtual;
Description Use the CreateItem method to create a new style in a repository. The class of the style to create is determined by the AStyleClass parameter. The current repository object becomes the owner of the new style and is used to initialize the TcxCustomStyle.StyleRepository property. The method returns the style object created.
Page 606 of 938
TcxStyleRepository.CreateItemEx TcxStyleRepository See Also Creates a new style in the repository with a specified owner. type TcxCustomStyleClass = class of TcxCustomStyle; function CreateItemEx(AStyleClass: TcxCustomStyleClass; AOwner: TComponent): TcxCustomStyle; virtual; Description The CreateItemEx method allows you to create a style with a specified owner. The AStyleClass parameter identifies the class of the style to create. The StyleRepository property of the style created is initialized with the current TcxStyleRepository object.
Page 607 of 938
TcxStyleRepository.CreateStyleSheet TcxStyleRepository Creates and adds a style sheet to the style repository. type TcxCustomStyleSheetClass = class of TcxCustomStyleSheet; function CreateStyleSheet(AStyleSheetClass: TcxCustomStyleSheetClass): TcxCustomStyleSheet; virtual; Description The CreateStyleSheet method creates a style sheet of class specified by the AStyleSheetClass parameter and adds it to the style repository. If the operation is successful the method returns the newly added style sheet.
Page 608 of 938
TcxStyleRepository.CreateStyleSheetEx TcxStyleRepository Creates a style sheet and adds it to the style repository. type TcxCustomStyleSheetClass = class of TcxCustomStyleSheet; function CreateStyleSheetEx(AStyleSheetClass: TcxCustomStyleSheetClass; AOwner: TComponent): TcxCustomStyleSheet; virtual; Description The CreateStyleSheetEx method creates a style sheet of class specified by the AStyleSheetClass parameter and adds it to the style repository. The AOwner parameter specifies the owner component for the added style sheet. If the operation is successful, the method returns the newly added style sheet. You should not use this method directly. It is for internal use. Use the CreateStyleSheet method instead.
Page 609 of 938
TcxStyleRepository.Destroy TcxStyleRepository Destroys the current TcxStyleRepository object. destrutor Destroy; override;
Description The destructor disposes all styles the repository owns and frees all resources allocated by the object.
Page 610 of 938
TcxStyleRepository.Items TcxStyleRepository See Also Provides indexed access to a collection of styles in the current repository object. property Items[Index: Integer]: TcxCustomStyle;
Description The Items property allows you to access a specific style by its index. The number of styles is determined by the Count property. ReadOnly Property
Page 611 of 938
TcxStyleRepository.Scalable TcxStyleRepository Specifies whether the font size of all styles stored within the current style repository is automatically adjusted, based on the system font size. property Scalable: Boolean; Description Set this property to True to automatically scale a style’s font size in response to screen resolution and system font size changes. Otherwise, the font size is always equal to the style’s Font.Size property value. Use the Scalable property in conjunction with a form’s Scaled property. The default value of the Scalable property is False.
Page 612 of 938
TcxStyleRepository.StyleSheetCount TcxStyleRepository Determines the number of style sheets within the style repository. property StyleSheetCount: Integer; Description The StyleSheetCount property determines the style sheet count within the repository. All available style sheets are represented by the StyleSheets property. ReadOnly Property
Page 613 of 938
TcxStyleRepository.StyleSheets TcxStyleRepository Represents all available style sheets within the style repository. property StyleSheets[Index: Integer]: TcxCustomStyleSheet; Description The StyleSheets property represents all available style sheets within the style repository and enables accessing them by a zero-based index. The index cannot be greater than StyleSheetCount–1. At design time, you can access the available styles via the style repository editor:
ReadOnly Property
Page 614 of 938
TcxStyle.AssignedValues TcxStyle Determines which style attributes are assigned. type TcxStyleValues = set of TcxStyleValue; property AssignedValues: TcxStyleValues;
Description The AssignedValues property consists of a set of flags controlling which style attributes are used to render elements of a specific control. When the Color, Font or TextColor properties are assigned, the corresponding flags in AssignedValues are enabled, thus specifying that these attributes are used when drawing a control element. If any flag in AssignedValues is not enabled, the value of the corresponding attribute is not used when drawing.
Page 615 of 938
TcxStyle.Bitmap TcxStyle See Also Specifies the background bitmap for a control element. property Bitmap: TBitmap;
Description Use the Bitmap property to specify the background bitmap for a control element. Setting this property overrides the Color property value. The following image shows a view with bitmaps assigned to the GroupByBox and Content styles:
When assigning the Bitmap property, the svBitmap flag is automatically activated in the AssignedValues property.
Page 616 of 938
TcxStyle.Color TcxStyle Defines the background color for a control element. property Color: TColor;
Description The Color property determines the color of control background. When assigning the Color property the svColor flag is automatically set in AssignedValues.
Page 617 of 938
TcxStyle.Create TcxStyle Creates an instance of the TcxStyle class. constructor Create(AOwner: TComponent); override;
Description The constructor creates an instance of the TcxStyle class and initializes its attributes to their default values.
Page 618 of 938
TcxStyle.Destroy TcxStyle Destroys an instance of the TcxStyle class. destructor Destroy; override;
Description The destructor frees all resources allocated by the current TcxStyle object. The destructor deletes the object from a repository, if assigned, and sends notification when destroyed to all listeners.
Page 619 of 938
TcxStyle.Font TcxStyle Specifies the font of the output text in a control element. property Font: TFont;
Description The Font property defines the font attributes such as height, font family and style (bold, italic, etc.). The TFont.Color attribute is ignored. Use the TextColor property instead to specify the font color. When changing Font attributes the svFont flag is set in AssignedValues.
Page 620 of 938
TcxStyle.RestoreDefaults TcxStyle See Also Clears all the flags in the AssignedValues property. procedure RestoreDefaults; override;
Description The RestoreDefaults method clears all the flags in the AssignedValues property, thus preventing the corresponding style attributes (Color, Font, TextColor) from being used when rendering a control element. RestoreDefaults also sets the Color and TextColor properties to clDefault.
Page 621 of 938
TcxStyle.TextColor TcxStyle Specifies the text color. property TextColor: TColor;
Description The TextColor defines the color of the text (in contrast to the background color determined by the Color property). When TextColor is assigned, the svTextColor flag is set in AssignedValues.
Page 622 of 938
TcxStyleValue type Enumerates flags indicating which TcxStyle attributes are assigned. Unit cxStyles type
TcxStyleValue = (svBitmap, svColor, svFont, svTextColor); Description The TcxStyleValue type enumerates the flags indicating which TcxStyle attributes are assigned. These flags are set via the TcxStyle.AssignedValues property. Value Meaning
svBitmap Indicates that a value is assigned to the TcxStyle.Bitmap property.
svColor Indicates that a value is assigned to the TcxStyle.Color property.
svFont Indicates that a value is assigned to the TcxStyle.Font property.
svTextColor Indicates that a value is assigned to the TcxStyle.TextColor property.
Page 623 of 938
TcxStyleValues type Represents a set of flags indicating what style attributes of a TcxStyle object are assigned values. Unit cxStyles type TcxStyleValues = set of TcxStyleValue;
Description The TcxStyleValues type represents a set of flags indicating what TcxStyle attributes are set. Use the TcxStyle.AssignedValues property to access these flags.
Page 624 of 938
TcxCustomStyle Methods TcxCustomStyle Legend In TcxCustomStyle AddListener Create Destroy RemoveListener RestoreDefaults
Page 625 of 938
TcxCustomStyles Methods TcxCustomStyles Legend In TcxCustomStyles Assign Create Destroy StyleChanged StyleRemoved
Page 626 of 938
TcxCustomStyleSheet Methods TcxCustomStyleSheet Legend In TcxCustomStyleSheet Create Destroy GetStyles GetStylesClass SetStyles
Page 627 of 938
TcxStyle Methods TcxStyle Legend In TcxStyle Create Destroy RestoreDefaults Derived from TcxCustomStyle AddListener Create Destroy RemoveListener RestoreDefaults
Page 628 of 938
TcxStyleRepository Methods TcxStyleRepository Legend In TcxStyleRepository Clear ClearStyleSheets Create CreateItem CreateItemEx CreateStyleSheet CreateStyleSheetEx Destroy
Page 629 of 938
TcxStyles Methods TcxStyles Legend Derived from TcxCustomStyles Assign Create Destroy
Page 630 of 938
TcxCustomStyle Properties TcxCustomStyle Legend In TcxCustomStyle StyleRepository
Page 631 of 938
TcxCustomStyles Properties TcxCustomStyles Legend In TcxCustomStyles StyleSheet
Page 632 of 938
TcxCustomStyleSheet Properties TcxCustomStyleSheet Legend In TcxCustomStyleSheet Caption StyleRepository
Page 633 of 938
TcxStyle Properties TcxStyle Legend In TcxStyle AssignedValues Bitmap Color Font TextColor Derived from TcxCustomStyle StyleRepository
Page 634 of 938
TcxStyleRepository Properties TcxStyleRepository Legend In TcxStyleRepository Count Items Scalable StyleSheetCount StyleSheets
Page 635 of 938
TcxStyles Properties TcxStyles Legend Derived from TcxCustomStyles StyleSheet
Page 636 of 938
Hierarchy TComponent | TcxComponent |
Page 637 of 938
Hierarchy TInterfacedPersistent | TcxInterfacedPersistent |
Page 638 of 938
Hierarchy TComponent |
Page 639 of 938
Hierarchy TComponent |
Page 640 of 938
Hierarchy TInterfacedPersistent | TcxInterfacedPersistent | TcxCustomStyles | TcxStyles
Page 641 of 938
Hierarchy TComponent | TcxCustomStyle |
Page 642 of 938
AlphaMask global constant Help is not yet available. Unit dxCoreGraphics const AlphaMask = $ff000000; Description Help is not yet available.
Page 643 of 938
AlphaShift global constant Help is not yet available. Unit dxCoreGraphics const AlphaShift = 24; Description Help is not yet available.
Page 644 of 938
BlueMask global constant Help is not yet available. Unit dxCoreGraphics const BlueMask = $000000ff; Description Help is not yet available.
Page 645 of 938
BlueShift global constant Help is not yet available. Unit dxCoreGraphics const BlueShift = 0; Description Help is not yet available.
Page 646 of 938
GreenMask global constant Help is not yet available. Unit dxCoreGraphics const GreenMask = $0000ff00; Description Help is not yet available.
Page 647 of 938
GreenShift global constant Help is not yet available. Unit dxCoreGraphics const GreenShift = 8; Description Help is not yet available.
Page 648 of 938
RedMask global constant Help is not yet available. Unit dxCoreGraphics const RedMask = $00ff0000; Description Help is not yet available.
Page 649 of 938
RedShift global constant Help is not yet available. Unit dxCoreGraphics const RedShift = 16; Description Help is not yet available.
Page 650 of 938
cxGetBitmapPixelFormat Function Help is not yet available. Unit dxCoreGraphics function cxGetBitmapPixelFormat(ABitmap: TBitmap): Integer; Description Help is not yet available.
Page 651 of 938
dxAlphaColorToColor Function See Also Converts a specified TdxAlphaColor value to the TColor type. Unit dxCoreGraphics Overloaded Variants type TdxAlphaColor = type DWORD; function dxAlphaColorToColor(AColor: TdxAlphaColor): TColor; overload; function dxAlphaColorToColor(AColor: TdxAlphaColor; out AAlpha: Byte): TColor; overload;
Description AColor specifies the TdxAlphaColor value that needs to be converted to the TColor type. The second overloaded variant extracts the alpha value from AColor to return it using the AAlpha parameter.
Page 652 of 938
dxAlphaColorToColorRef Function See Also Converts a specified TdxAlphaColor value to the COLORREF type. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxAlphaColorToColorRef(AColor: TdxAlphaColor): COLORREF; Description AColor specifies the TdxAlphaColor value that needs to be converted to the COLORREF type. Note that the alpha value of the source color is ignored by this conversion.
Page 653 of 938
dxAlphaColorToRGBQuad Function Help is not yet available. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxAlphaColorToRGBQuad(AColor: TdxAlphaColor): TRGBQuad; Description Help is not yet available.
Page 654 of 938
dxColorRefToAlphaColor Function See Also Converts a specified COLORREF value to the TdxAlphaColor type. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxColorRefToAlphaColor(AREF: COLORREF): TdxAlphaColor; Description AREF specifies the COLORREF value that needs to be converted to the TdxAlphaColor type. Note that the alpha value of the returned color value is 255 (non-transparent, also called solid).
Page 655 of 938
dxColorToAlphaColor Function See Also Converts a specified TColor value to the TdxAlphaColor type. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxColorToAlphaColor(AColor: TColor; AAlpha: Byte = 255): TdxAlphaColor; Description The function creates a non-transparent (also called solid) color by default. You can explicitly specify the color’s alpha value via the AAlpha parameter.
Page 656 of 938
dxColorToRGBQuad Function Help is not yet available. Unit dxCoreGraphics function dxColorToRGBQuad(AColor: TColor; AReserved: Byte = 0): TRGBQuad; Description Help is not yet available.
Page 657 of 938
dxFillBitmapInfoHeader Procedure Help is not yet available. Unit dxCoreGraphics Overloaded Variants procedure dxFillBitmapInfoHeader(out AHeader: TBitmapInfoHeader; ABitmap: TBitmap; ATopDownDIB: WordBool); overload; procedure dxFillBitmapInfoHeader(out AHeader: TBitmapInfoHeader; AWidth, AHeight: Integer; ATopDownDIB: WordBool); overload;
Description Help is not yet available.
Page 658 of 938
dxGetAlpha Function See Also Extracts the alpha value from the TdxAlphaColor value passed as the AColor parameter. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxGetAlpha(AColor: TdxAlphaColor): Byte;
Page 659 of 938
dxGetBitmapData Function Help is not yet available. Unit dxCoreGraphics function dxGetBitmapData(ABitmapHandle: HBITMAP; out ABitmapData: Windows.TBitmap): Boolean; Description Help is not yet available.
Page 660 of 938
dxGetBlue Function See Also Extracts the blue color value from the TdxAlphaColor value passed as the AColor parameter. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxGetBlue(AColor: TdxAlphaColor): Byte;
Page 661 of 938
dxGetBrushData Function Help is not yet available. Unit dxCoreGraphics Overloaded Variants function dxGetBrushData(ABrushHandle: HBRUSH; out ALogBrush: TLogBrush): Boolean; overload; function dxGetBrushData(ABrushHandle: HBRUSH): TLogBrush; overload;
Description Help is not yet available.
Page 662 of 938
dxGetFontData Function Help is not yet available. Unit dxCoreGraphics Overloaded Variants function dxGetFontData(AFontHandle: HFONT; out ALogFont: TLogFont): Boolean; overload; function dxGetFontData(AFontHandle: HFONT): TLogFont; overload;
Description Help is not yet available.
Page 663 of 938
dxGetGreen Function See Also Extracts the green color value from the TdxAlphaColor value passed as the AColor parameter. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxGetGreen(AColor: TdxAlphaColor): Byte;
Page 664 of 938
dxGetPenData Function Help is not yet available. Unit dxCoreGraphics function dxGetPenData(APenHandle: HPEN; out ALogPen: TLogPen): Boolean; Description Help is not yet available.
Page 665 of 938
dxGetRed Function See Also Extracts the red color value from the TdxAlphaColor value passed as the AColor parameter. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; function dxGetRed(AColor: TdxAlphaColor): Byte;
Page 666 of 938
dxIsAlphaUsed Function Help is not yet available. Unit dxCoreGraphics function dxIsAlphaUsed(ABitmap: TBitmap): Boolean; Description Help is not yet available.
Page 667 of 938
dxMakeAlphaColor Function See Also Creates a TdxAlphaColor value from individual color component values and returns it as the function’s result. Unit dxCoreGraphics Overloaded Variants type TdxAlphaColor = type DWORD; function dxMakeAlphaColor(R, G, B: Byte): TdxAlphaColor; overload; function dxMakeAlphaColor(A, R, G, B: Byte): TdxAlphaColor; overload; function dxMakeAlphaColor(AColor: TColor; AAlpha: Byte = 255): TdxAlphaColor; overload;
Description The first overloaded variant accepts red, green, and blue color component values as the R, G, and B parameters, respectively. Note that the alpha value of the resulting color is 255 (non-transparent, also called solid). The second overloaded variant allows you to specify the alpha value of the resulting color using the A parameter. The third overloaded variant creates a TdxAlphaColor value based on TColor value and alpha value passed as the AColor and AAlpha parameters, respectively.
Page 668 of 938
dxRGBQuadToColor Function Help is not yet available. Unit dxCoreGraphics function dxRGBQuadToColor(const ARGB: TRGBQuad): TColor; Description Help is not yet available.
Page 669 of 938
GetBitmapBits Function Help is not yet available. Unit dxCoreGraphics type TRGBColors = array of TRGBQuad; function GetBitmapBits(ABitmap: TBitmap; var AColors: TRGBColors; ATopDownDIB: Boolean): Boolean; Description Help is not yet available.
Page 670 of 938
GetBitmapBitsByScanLine Procedure Help is not yet available. Unit dxCoreGraphics type TRGBColors = array of TRGBQuad; procedure GetBitmapBitsByScanLine(ABitmap: TBitmap; var AColors: TRGBColors); Description Help is not yet available.
Page 671 of 938
SetBitmapBits Procedure Help is not yet available. Unit dxCoreGraphics type TRGBColors = array of TRGBQuad; procedure SetBitmapBits(ABitmap: TBitmap; const AColors: TRGBColors; ATopDownDIB: Boolean); Description Help is not yet available.
Page 672 of 938
PdxAlphaColor type Help is not yet available. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; PdxAlphaColor = ^TdxAlphaColor; Description Help is not yet available.
Page 673 of 938
TdxAlphaColor type The color data type that stores the alpha value in addition to the color component values. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; Description Unlike the standard TColor, the TdxAlphaColor type was designed to store the alpha value in addition to color component values (Red, Green, and Blue). TdxAlphaColor stores data in ARGB (Alpha, Red, Green, and Blue) format, which corresponds to the ARGB color presentation in GDI+.
Page 674 of 938
TdxAlphaColors type Help is not yet available. Unit dxCoreGraphics type TdxAlphaColor = type DWORD; TdxAlphaColors = array of TdxAlphaColor; Description Help is not yet available.
Page 675 of 938
TdxGraphicUnit type Help is not yet available. Unit dxCoreGraphics type TdxGraphicUnit = ( guWorld, // 0 -- World coordinate (non-physical unit) guDisplay, // 1 -- Variable -- for PageTransform only guPixel, // 2 -- Each unit is one device pixel. guPoint, // 3 -- Each unit is a printer's point, or 1/72 inch. guInch, // 4 -- Each unit is 1 inch. guDocument, // 5 -- Each unit is 1/300 inch. guMillimeter // 6 -- Each unit is 1 millimeter. ); Description Help is not yet available.
Page 676 of 938
TRGBColors type Help is not yet available. Unit dxCoreGraphics type TRGBColors = array of TRGBQuad; Description Help is not yet available.
Page 677 of 938
dxCoreGraphics Unit Other Types PdxAlphaColor TdxAlphaColor TdxAlphaColors TdxGraphicUnit TRGBColors Routines cxGetBitmapPixelFormat dxAlphaColorToColor dxAlphaColorToColorRef dxAlphaColorToRGBQuad dxColorRefToAlphaColor dxColorToAlphaColor dxColorToRGBQuad dxFillBitmapInfoHeader dxGetAlpha dxGetBitmapData dxGetBlue dxGetBrushData dxGetFontData dxGetGreen dxGetPenData dxGetRed dxIsAlphaUsed dxMakeAlphaColor dxRGBQuadToColor GetBitmapBits GetBitmapBitsByScanLine SetBitmapBits Global Constants AlphaMask AlphaShift BlueMask BlueShift GreenMask GreenShift RedMask RedShift
Page 678 of 938
TcxCustomHintStyle Object Hierarchy The base class for the TcxHintStyle and TdxScreenTipStyle classes that contain style settings for hints controlled by the TcxHintStyleController component. Unit dxCustomHint TcxCustomHintStyle = class(TcxInterfacedPersistent) Description Do not use this class directly. Use its descendants instead.
Page 679 of 938
TcxCustomHintStyleController Object Hierarchy Properties Methods Events Serves as the base for components controlling the appearance and behavior of hints within the application. Unit dxCustomHint TcxCustomHintStyleController = class(TComponent) Description The TcxCustomHintStyleController class implements the functionality required by its descendant – the TcxHintStyleController component. This descendant is used to control the appearance and behavior of hints in the application or form (the Global property value specifies what it controls). Once the component is placed on a form, its properties affect all hints within the application or form. Please refer to the TcxHintStyleController class description for details. Do not create instances of TcxCustomHintStyleController class. If you need a hint style controller in your application, place the TcxHintStyleController component on a form. The TcxCustomHintStyleController can be used to derive other hint style controllers.
Page 680 of 938
TcxCustomHintStyleController.Global TcxCustomHintStyleController Specifies whether the current hint controller’s style has a global effect within an application. property Global: Boolean; Description Whenever an active hint style controller with the Global property set to True is present within an application, each control that shows its hints uses this hint style controller’s style unless another (which is called "local") hint style controller is defined within the form. When neither a global hint style controller (within the application) or a local hint style controller (within the form) is present, the standard hint style is used. Set the Global property to True to designate the current hint style controller as global. Doing so also renders the existing (if any) global hint style controller as local. There can be only one global hint style controller at a time. Note: The first hint style controller created automatically assumes the global role.
Page 681 of 938
TcxCustomHintStyleController.HideHint TcxCustomHintStyleController Hides the hint that was previously invoked using the ShowHint method. procedure HideHint; Description Call this method to hide the hint invoked using the ShowHint method. If no hint invoked using this method is currently active, the HideHint method does nothing.
Page 682 of 938
TcxCustomHintStyleController.HintHidePause TcxCustomHintStyleController See Also Specifies the time interval during which the hint is displayed. property HintHidePause: Integer; Description The HintHidePause property specifies the interval in milliseconds between the time when the hint appears and before it is hidden. This assumes that the mouse pointer stays within the control displaying the hint. If the mouse pointer leaves the control area, the hint is hidden immediately. When you assign a value to the HintHidePause property, it is actually passed to the application’s HintHidePause property. The default value of the HintHidePause property is 2500.
Page 683 of 938
TcxCustomHintStyleController.HintPause TcxCustomHintStyleController See Also Specifies the time interval before the hint is displayed. property HintPause: Integer; Description The HintPause property specifies the interval, in milliseconds, between the time when the mouse pointer enters the control’s area and when the hint is displayed. If you need hints to be displayed immediately, set this property to 0. Note that if the mouse pointer leaves the control’s area before this time has elapsed, the hint is not displayed at all. When you assign a value to the HintPause property, it is actually passed to the application’s HintPause property. The default value of the HintPause property is 500.
Page 684 of 938
TcxCustomHintStyleController.HintShortPause TcxCustomHintStyleController See Also Specifies the time period passed before a hint is displayed if another hint has already been shown. property HintShortPause: Integer; Description Use the HintShortPause property to reduce the flicker when moving the mouse quickly over a set of buttons that all have help hints. If flicker appears, assign a greater value to this property. Values are set in milliseconds. When you assign a value to the HintShortPause property, it is actually assigned to the application’s HintShortPause property. The default value of the HintShortPause property is 50.
Page 685 of 938
TcxCustomHintStyleController.HintStyle TcxCustomHintStyleController See Also Specifies the hint style. property HintStyle: TcxCustomHintStyle; Description Use this property to select one of two available hint styles – hints or ScreenTips. Once selected, the HintStyle property returns a TcxHintStyle or TdxScreenTipStyle class instance, which contains the respective style settings. Refer to the TcxHintStyle or TdxScreenTipStyle class descriptions to learn about these settings.
Page 686 of 938
TcxCustomHintStyleController.HintWindow TcxCustomHintStyleController See Also Provides access to a hint window. property HintWindow: TcxCustomHintWindow; Description Use the HintWindow.Caption property to modify a hint’s caption in a currently displayed hint window. ReadOnly Property
Page 687 of 938
TcxCustomHintStyleController.LookAndFeel TcxCustomHintStyleController See Also Specifies the hint painting style. property LookAndFeel: TcxLookAndFeel; Description Styles include:
l Five predefined styles provided by the TcxLookAndFeel. l Skins from the ExpressSkins Library.
Page 688 of 938
TcxCustomHintStyleController.LookAndFeelPainter TcxCustomHintStyleController See Also Provides access to the painter that corresponds to the currently used painting style. property LookAndFeelPainter: TcxCustomLookAndFeelPainter; Description Use the LookAndFeelPainter property to paint the hint manually, if required. ReadOnly Property
Page 689 of 938
TcxCustomHintStyleController.OnHintStyleChanged TcxCustomHintStyleController Fires when any attributes referenced by the HintStyle property setting have been changed. type TcxHintStyleChangedEvent = procedure(Sender: TObject; AStyle: TcxCustomHintStyle) of object; property OnHintStyleChanged: TcxHintStyleChangedEvent; Description Handle this event if you allow end-users to alter hint styles and want to provide a common response to property changes. For instance, you may want to restrict certain style attribute combinations. Sender specifies the hint controller component that raised the event. AStyle contains style settings of the hint controller (its HintStyle property value).
Page 690 of 938
TcxCustomHintStyleController.OnShowHint TcxCustomHintStyleController Fires before a hint is displayed. type TcxShowHintEvent = procedure(Sender: TObject; var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo) of object; property OnShowHint: TcxShowHintEvent; Description This event is obsolete and used for compatibility purposes. Use the OnShowHintEx event instead.
Page 691 of 938
TcxCustomHintStyleController.OnShowHintEx TcxCustomHintStyleController Fires before a hint is displayed. type TcxShowHintExEvent = procedure(Sender: TObject; var Caption, HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo) of object; property OnShowHintEx: TcxShowHintExEvent; Description Handle this event to control the visibility, appearance, and behavior of a hint window. Sender specifies the hint controller component that raised the event. To prohibit a hint from appearing, pass False as the CanShow parameter. Otherwise, a hint will be displayed. Use the Caption and HintStr parameters to specify the hint’s caption and body. To customize the appearance and behavior of the hint window, use the HintInfo parameter. Refer to the THintInfo type description for details. Note: Calling the ShowHint method doesn’t fire the OnShowHintEx and OnShowHint events.
Page 692 of 938
TcxCustomHintStyleController.ShowHint TcxCustomHintStyleController Displays a hint window, already pre-configured, at a specified position on screen. procedure ShowHint(X, Y: Integer; ACaption, AHint: string; AMaxWidth: Integer = 0); Description Calling this method hides the hint that was invoked previously. If you need to hide the currently active hint, use the HideHint method. The X and Y parameters specify the hint’s top-left corner position. They represent the horizontal and vertical screen coordinates respectively. The ACaption and AHint parameters specify strings that will be displayed as the hint’s caption and body. If you don’t need to display a caption, pass an empty string as the ACaption parameter. To modify the caption of the displayed hint, use the HintWindow.Caption property. The AMaxWidth parameter specifies the maximum width of a hint window (in pixels). 0 indicates that its width is limited by the screen width. Note: The ShowHint method doesn’t fire the OnShowHintEx event.
Page 693 of 938
TcxCustomHintStyleController.UseHintControlLookAndFeel TcxCustomHintStyleController Specifies whether to use the corresponding control’s look and feel. property UseHintControlLookAndFeel: Boolean; Description
The default value of the UseHintControlLookAndFeel property is False.
Value Meaning
True The hint is painted with the look and feel specified by the corresponding control’s LookAndFeel property.
False The hint is painted with the look and feel specified by the hint style controller’s LookAndFeel property.
Page 694 of 938
TcxCustomHintStyleController Events TcxCustomHintStyleController Legend In TcxCustomHintStyleController OnHintStyleChanged OnShowHint OnShowHintEx
Page 695 of 938
TcxCustomHintStyleController Methods TcxCustomHintStyleController Legend In TcxCustomHintStyleController HideHint ShowHint
Page 696 of 938
TcxCustomHintStyleController Properties TcxCustomHintStyleController Legend In TcxCustomHintStyleController Global HintHidePause HintPause HintShortPause HintStyle HintWindow LookAndFeel LookAndFeelPainter UseHintControlLookAndFeel
Page 697 of 938
Hierarchy TComponent | TcxCustomHintStyleController
Page 698 of 938
Hierarchy TInterfacedPersistent | TcxInterfacedPersistent | TcxCustomHintStyle
Page 699 of 938
TdxFader.MaxAnimationCount TdxFader Specifies the maximum number of animations that can be played at one time. property MaxAnimationCount: Integer;
Description Decreasing this property value allows you to improve performance. Possible values are 0 through 20. The default value of the MaxAnimationCount property is 10.
Page 700 of 938
TdxFadingOptions.FadeInFrameCount TdxFadingOptions See Also Specifies the number of frames for a fade-in animation effect. property FadeInFrameCount: Integer; Description Possible values are 1 through 32. The default value of the FadeInFrameCount property is specified by the dxFadeInDefaultAnimationFrameCount global constant.
Page 701 of 938
TdxFadingOptions.FadeInFrameDelay TdxFadingOptions See Also Specifies the frame delay (in milliseconds) for a fade-in animation effect. property FadeInFrameDelay: Integer; Description Possible values are 10 through 300. The default value of the FadeInFrameDelay property is specified by the dxFadeInDefaultAnimationFrameDelay global constant.
Page 702 of 938
TdxFadingOptions.FadeOutFrameCount TdxFadingOptions See Also Specifies the number of frames for a fade-out animation effect. property FadeOutFrameCount: Integer; Description Possible values are 1 through 32. The default value of the FadeOutFrameCount property is specified by the dxFadeOutDefaultAnimationFrameCount global constant.
Page 703 of 938
TdxFadingOptions.FadeOutFrameDelay TdxFadingOptions See Also Specifies the frame delay (in milliseconds) for a fade-out animation effect. property FadeOutFrameDelay: Integer; Description Possible values are 10 through 300. The default value of the FadeInFrameDelay property is specified by the dxFadeOutDefaultAnimationFrameDelay global constant.
Page 704 of 938
TdxFader Properties TdxFader Legend In TdxFader MaxAnimationCount State
Page 705 of 938
TdxFadingOptions Properties TdxFadingOptions Legend In TdxFadingOptions FadeInFrameCount FadeInFrameDelay FadeOutFrameCount FadeOutFrameDelay
Page 706 of 938
Hierarchy TObject | TdxFader
Page 707 of 938
Hierarchy TPersistent | TdxFadingOptions
Page 708 of 938
TdxCustomGalleryGroupHeader.Alignment TdxCustomGalleryGroupHeader Specifies the horizontal alignment of a group header’s content. property Alignment: TAlignment; The default value of the Alignment property is taLeftJustify.
Page 709 of 938
TdxCustomGalleryGroupHeader.Caption TdxCustomGalleryGroupHeader Specifies a group header’s caption. property Caption: string;
Page 710 of 938
TdxCustomGalleryGroupHeader.Visible TdxCustomGalleryGroupHeader Specifies whether a group header is visible. property Visible: Boolean; Description The group header is visible if this property is set to True. The default value of the Visible property is False.
Page 711 of 938
TdxCustomGalleryGroups.Add TdxCustomGalleryGroups Creates a new group and appends it to the current collection. function Add: TdxCustomGalleryGroup; Description This function creates a new group with default settings, appends it to the current collection and returns the created group as the function’s result.
Page 712 of 938
TdxCustomGalleryGroups.Groups TdxCustomGalleryGroups Provides zero-based indexed access to groups contained within the collection. property Groups[AIndex: Integer]: TdxCustomGalleryGroup;
Page 713 of 938
TdxCustomGalleryGroup.Caption TdxCustomGalleryGroup Specifies the gallery group’s caption. property Caption: string; Description Use the Caption property to specify the group’s caption text.
Page 714 of 938
TdxCustomGalleryGroup.ItemCount TdxCustomGalleryGroup Specifies number of the items, which belong to the current TdxCustomGalleryGroup. property ItemCount: Integer; Description Use the ItemCount property to get the total number of items within the gallery’s collection of items. Use this property in combination with Items to iterate through a child item collection. ReadOnly Property
Page 715 of 938
TdxCustomGalleryGroup.Items TdxCustomGalleryGroup Provides access to the child item collection. property Items: TdxGalleryItems; Description This property allows you to iterate through the list of child items. To access an individual item, use indexer notation. To get the count of the items within the collection of items, use the ItemCount property.
Page 716 of 938
TdxCustomGalleryGroup.ShowCaption TdxCustomGalleryGroup Specifies the group header’s visibility. property ShowCaption: Boolean; Description Set this property to False to hide the group's caption. By default, the property is set to True to show the caption.
Page 717 of 938
TdxCustomGalleryGroup.Visible TdxCustomGalleryGroup Specifies whether the current group is visible within the control. property Visible: Boolean; Description Set this property to False to hide the current group within the control. The default value of the Visible property is True.
Page 718 of 938
TdxCustomGalleryItems.Add TdxCustomGalleryItems Adds a new item to the collection. function Add: TdxCustomGalleryItem; Description Call this method to create a new item and add it to the collection. This method returns the newly created item object, allowing you to customize item settings.
Page 719 of 938
TdxCustomGalleryItems.Items TdxCustomGalleryItems Provides indexed access to the items in the group. property Items[AIndex: Integer]: TdxCustomGalleryItem; Description Use the Items property to access an individual item. The AIndex parameter specifies the item index.
Page 720 of 938
TdxCustomGalleryItem.Caption TdxCustomGalleryItem Specifies the item’s caption. property Caption: string; Description Use the Caption property to specify the item’s caption text. Use the Description property to specify a descriptive text to be displayed under the caption.
Page 721 of 938
TdxCustomGalleryItem.Description TdxCustomGalleryItem Specifies a descriptive text for a gallery item. property Description: string; Description The specified text is always displayed under the item caption.
Page 722 of 938
TdxCustomGalleryItem.Enabled TdxCustomGalleryItem Specifies whether the item is enabled. property Enabled: Boolean; Description Set this property to False to prevent the end-user from changing the item’s state. The default value of the Enabled property is True.
Page 723 of 938
TdxCustomGalleryItem.Glyph TdxCustomGalleryItem Specifies the glyph displayed. property Glyph: TdxSmartGlyph; Description Use this property to specify an image for the gallery item. To accomplish this, call the Glyph.Assign method and pass the required image as its parameter. If Glyph is specified, the ImageIndex property is ignored.
Page 724 of 938
TdxCustomGalleryItem.Hint TdxCustomGalleryItem Specifies whether the item displays a hint. property Hint: string; Description Use the Hint property to provide a hint that appears when user moves the mouse over the item.
Page 725 of 938
TdxCustomGalleryItem.ImageIndex TdxCustomGalleryItem Specifies the item glyph by pointing to an image in the associated image list. type {$IFDEF DELPHI17} TcxImageIndex = System.UITypes.TImageIndex; {$ELSE} TcxImageIndex = ImgList.TImageIndex; {$ENDIF} property ImageIndex: TcxImageIndex; Description Use the ImageIndex property to designate an image that should be displayed by this item. The image is specified by its index within the image list assigned to the TdxGalleryControl.Images property. In order to use this property:
1. Place an image list control onto a form; 2. Populate it with images; 3. Select the required gallery in the Object Inspector; 4. Assign the list as shown below:
Now you can choose the item’s image in the gallery’s designer.
The default value of the ImageIndex property is –1.
Page 726 of 938
TdxCustomGallery.ClickItem TdxCustomGallery How To Check And Uncheck Gallery Items Emulates item clicks. procedure ClickItem(AItem: TdxGalleryItem); Description This method is called automatically when end-users click gallery items. The currently clicked item is specified by the AItem parameter. You can call this method manually to emulate item clicks. Note that this method’s behavior depends on the ItemCheckMode property value.
Page 727 of 938
TdxCustomGallery.FindItemByTag TdxCustomGallery Locates an item with the specified tag value. function FindItemByTag(ATag: Integer): TdxGalleryItem; Description Use the FindItemByTag method to locate an item. This method finds an item whose TdxGalleryControlItem.Tag property value matches the ATag parameter. If there are multiple items with the same Tag property value, the method returns the first found item.
Page 728 of 938
TdxCustomGallery.GetAllItems TdxCustomGallery Writes all gallery items to the list passed as a parameter. procedure GetAllItems(AList: TList); Description This method iterates all groups and items and appends each item to the list passed as the AList parameter.
Page 729 of 938
TdxCustomGallery.GetCheckedItem TdxCustomGallery How To Check And Uncheck Gallery Items Returns the currently checked item. function GetCheckedItem: TdxGalleryItem; Description In icmSingleCheck or icmSingleRadio mode, this function returns the checked item. If multiple item selection is allowed, GetCheckedItem returns the first item that is checked.
Page 730 of 938
TdxCustomGallery.GetCheckedItems TdxCustomGallery How To Check And Uncheck Gallery Items Writes the checked items to the list passed as a parameter. procedure GetCheckedItems(AList: TList); Description Adds all checked items to the list passed as the AList parameter. Use this method if ItemCheckMode is ismMultiple.
Page 731 of 938
TdxCustomGallery.GetFirstItem TdxCustomGallery Gets the first item in the gallery. function GetFirstItem: TdxGalleryItem; Description Finds the first group that has items and returns its first item.
Page 732 of 938
TdxCustomGallery.Groups TdxCustomGallery Provides access to the collection of gallery groups. property Groups: TdxGalleryGroups; Description Use this property to manipulate groups within the gallery. You can access individual groups using indexer notation. Each group holds a collection of child items.
Page 733 of 938
TdxCustomGallery.ItemCheckMode TdxCustomGallery How To Check And Uncheck Gallery Items Specifies how a gallery’s items can be selected. type TdxGalleryItemCheckMode = (icmNone, icmSingleCheck, icmSingleRadio, icmMultiple); property ItemCheckMode: TdxGalleryItemCheckMode; Description Allows you to set one of the following selection modes.
The default value of the ItemCheckMode property is icmNone.
Value Description
icmNone Item selection is disabled.
icmSingleCheck One or zero items can be selected.
icmSingleRadio One item is always selected.
icmMultiple Multiple items can be selected. In this mode, clicking an item toggles its selected state.
Page 734 of 938
TdxCustomGallery.UncheckAll TdxCustomGallery How To Check And Uncheck Gallery Items Unchecks all items. procedure UncheckAll; Description This method unchecks all items in the gallery.
Page 735 of 938
TdxGalleryGroups.Add TdxGalleryGroups Creates a new group and appends it to the current collection. function Add: TdxGalleryGroup; Description This function creates a new group with default settings, appends it to the current collection and returns the created group as the function’s result.
Page 736 of 938
TdxGalleryGroups.FindByCaption TdxGalleryGroups Searches the collection for a group with a specified caption. function FindByCaption(const ACaption: string; out AGroup: TdxGalleryGroup): Boolean; Description This function returns the first collection item (a gallery group), whose Caption property value equals the ACaption parameter value. If the matching group is found, it is referenced via the AGroup parameter and the function returns True. Otherwise, False is returned.
Page 737 of 938
TdxGalleryGroups.Groups TdxGalleryGroups Provides zero-based indexed access to groups contained within the collection. property Groups[AIndex: Integer]: TdxGalleryGroup;
Page 738 of 938
TdxGalleryGroup.Items TdxGalleryGroup Provides access to the child item collection. property Items: TdxGalleryItems; Description This property allows you to iterate through the list of child items. To access an individual item, use indexer notation. To get the count of the items within the collection of items, use the ItemCount property.
Page 739 of 938
TdxGalleryItems.Add TdxGalleryItems Adds a new item to the TdxGalleryItems. function Add: TdxGalleryItem; Description Use the Add method to create a new item and add it to the list. This method returns the newly created item object, allowing you to customize the item.
Page 740 of 938
TdxGalleryItems.Items TdxGalleryItems Provides indexed access to the items in the group. property Items[AIndex: Integer]: TdxGalleryItem; Description Use the Items property to access an individual item. The AIndex parameter specifies the item index.
Page 741 of 938
TdxGalleryItem.Checked TdxGalleryItem How To Check And Uncheck Gallery Items Specifies whether the item is in a checked or unchecked state. property Checked: Boolean; Description This property’s behavior depends on the control’s ItemCheckMode property. The default value of the Checked property is False.
Page 742 of 938
How To Check And Uncheck Gallery Items To check/uncheck gallery items and determine checked state, you can use the following members: Members Description
TdxCustomGallery.ItemCheckMode Specifies how a gallery’s items can be selected.
TdxCustomGallery.ClickItem Emulates item clicks.
TdxCustomGallery.GetCheckedItem Gets the checked item.
TdxCustomGallery.GetCheckedItems Writes the checked items to the list as a parameter.
TdxCustomGallery.UncheckAll Unchecks all items.
TdxGalleryItem.Checked Specifies whether the item is in a checked or unchecked state.
Page 743 of 938
TdxCustomGallery Methods TdxCustomGallery Legend In TdxCustomGallery ClickItem FindItemByTag GetAllItems GetCheckedItem GetCheckedItems GetFirstItem UncheckAll
Page 744 of 938
TdxCustomGalleryGroup Methods TdxCustomGalleryGroup Legend Derived from TcxComponentCollectionItem AddToCollection GetParentComponent RemoveFromCollection SetParentComponent
Page 745 of 938
TdxCustomGalleryGroups Methods TdxCustomGalleryGroups Legend In TdxCustomGalleryGroups Add Derived from TcxComponentCollection Add BeginUpdate Clear Delete EndUpdate FindItemByID IndexOf Insert Remove Update
Page 746 of 938
TdxCustomGalleryItem Methods TdxCustomGalleryItem Legend Derived from TcxComponentCollectionItem AddToCollection GetParentComponent RemoveFromCollection SetParentComponent
Page 747 of 938
TdxCustomGalleryItems Methods TdxCustomGalleryItems Legend In TdxCustomGalleryItems Add Derived from TcxComponentCollection Add BeginUpdate Clear Delete EndUpdate FindItemByID IndexOf Insert Remove Update
Page 748 of 938
TdxGallery Methods TdxGallery Legend Derived from TdxCustomGallery ClickItem FindItemByTag GetAllItems GetCheckedItem GetCheckedItems GetFirstItem UncheckAll
Page 749 of 938
TdxGalleryGroup Methods TdxGalleryGroup Legend Derived from TcxComponentCollectionItem AddToCollection GetParentComponent RemoveFromCollection SetParentComponent
Page 750 of 938
TdxGalleryGroups Methods TdxGalleryGroups Legend In TdxGalleryGroups Add FindByCaption Derived from TdxCustomGalleryGroups Add Derived from TcxComponentCollection Add BeginUpdate Clear Delete EndUpdate FindItemByID IndexOf Insert Remove Update
Page 751 of 938
TdxGalleryItem Methods TdxGalleryItem Legend Derived from TcxComponentCollectionItem AddToCollection GetParentComponent RemoveFromCollection SetParentComponent
Page 752 of 938
TdxGalleryItems Methods TdxGalleryItems Legend In TdxGalleryItems Add Derived from TdxCustomGalleryItems Add Derived from TcxComponentCollection Add BeginUpdate Clear Delete EndUpdate FindItemByID IndexOf Insert Remove Update
Page 753 of 938
TdxCustomGallery Properties TdxCustomGallery Legend In TdxCustomGallery Groups ItemCheckMode
Page 754 of 938
TdxCustomGalleryGroup Properties TdxCustomGalleryGroup Legend In TdxCustomGalleryGroup Caption ItemCount Items ShowCaption Visible Derived from TcxComponentCollectionItem Collection ID Index
Page 755 of 938
TdxCustomGalleryGroupHeader Properties TdxCustomGalleryGroupHeader Legend In TdxCustomGalleryGroupHeader Alignment Caption Visible
Page 756 of 938
TdxCustomGalleryGroups Properties TdxCustomGalleryGroups Legend In TdxCustomGalleryGroups Groups Derived from TcxComponentCollection Count Items
Page 757 of 938
TdxCustomGalleryItem Properties TdxCustomGalleryItem Legend In TdxCustomGalleryItem Caption Description Enabled Glyph Hint ImageIndex Derived from TcxComponentCollection Collection ID Index
Page 758 of 938
TdxCustomGalleryItems Properties TdxCustomGalleryItems Legend In TdxCustomGalleryItems Items Derived from TcxComponentCollection Count Items
Page 759 of 938
TdxGallery Properties TdxGallery Legend Derived from TdxCustomGallery Groups ItemCheckMode
Page 760 of 938
TdxGalleryGroup Properties TdxGalleryGroup Legend In TdxGalleryGroup Items Derived from TdxCustomGalleryGroup Caption ItemCount Items ShowCaption Visible Derived from TcxComponentCollectionItem Collection ID Index
Page 761 of 938
TdxGalleryGroups Properties TdxGalleryGroups Legend In TdxGalleryGroups Groups Derived from TdxCustomGalleryGroups Groups Derived from TcxComponentCollection Count Items
Page 762 of 938
TdxGalleryItem Properties TdxGalleryItem Legend In TdxGalleryItem Checked Derived from TdxCustomGalleryItem Caption Description Enabled Glyph Hint ImageIndex Derived from TcxComponentCollection Collection ID Index
Page 763 of 938
TdxGalleryItems Properties TdxGalleryItems Legend In TdxGalleryItems Items Derived from TdxCustomGalleryItems Items Derived from TcxComponentCollection Count Items
Page 764 of 938
Hierarchy TPersistent | TcxOwnedPersistent | TdxCustomGalleryGroupHeader
Page 765 of 938
Hierarchy TPersistent | TcxComponentCollection | TdxCustomGalleryGroups
Page 766 of 938
Hierarchy TComponent | TcxComponentCollectionItem | TdxCustomGalleryGroup
Page 767 of 938
Hierarchy TPersistent | TcxComponentCollection | TdxCustomGalleryItems
Page 768 of 938
Hierarchy TComponent | TcxComponentCollectionItem | TdxCustomGalleryItem
Page 769 of 938
Hierarchy TPersistent | TcxOwnedPersistent | TcxOwnedInterfacedPersistent | TdxCustomGallery
Page 770 of 938
Hierarchy TPersistent | TcxComponentCollection | TdxCustomGalleryGroups | TdxGalleryGroups
Page 771 of 938
Hierarchy TComponent | TcxComponentCollectionItem | TdxCustomGalleryGroup | TdxGalleryGroup
Page 772 of 938
Hierarchy TPersistent | TcxComponentCollection | TdxCustomGalleryItems | TdxGalleryItems
Page 773 of 938
Hierarchy TComponent | TcxComponentCollectionItem | TdxCustomGalleryItem | TdxGalleryItem
Page 774 of 938
Hierarchy TPersistent | TcxOwnedPersistent | TcxOwnedInterfacedPersistent | TdxCustomGallery | TdxGallery
Page 775 of 938
TdxGPImage Object Hierarchy Properties Methods The base class for classes that implement image formats. Unit dxGDIPlusClasses TdxGPImage = class(TGraphic) Description Do not use this class directly. Instead, use the TdxSmartImage as a generic type.
Page 776 of 938
TdxSmartGlyph Object Hierarchy Properties Methods See Also A universal image format providing the capability to load a TBitmap image from a DFM file. Unit dxGDIPlusClasses TdxSmartGlyph = class(TdxSmartImage) Description This class extends its ancestor class with the capability to load TBitmap image from a DFM file.
Page 777 of 938
TdxGPBrushGradientPoints.Add TdxGPBrushGradientPoints See Also Creates a new key point on the gradient line. type TdxAlphaColor = type DWORD; procedure Add(AOffset: Single; AColor: TdxAlphaColor): Integer; Description Invoke this procedure to specify a new key point by both its position and color as the AOffset and AColor parameters, respectively. Each call of the Add method increases the Count property value by one.
Similarly to the respective Offsets property, the AOffset parameter ranges from 0 to 1 (i.e., from the beginning to the end of the gradient line, whose direction is determined by the brush’s GradientMode property value).
Note: Since both the brush and its gradient points support transparency, they use the TdxAlphaColor instead of standard TColor as a color type.
Page 778 of 938
TdxGPBrushGradientPoints.Capacity TdxGPBrushGradientPoints Specifies the maximum number of key points on the gradient line. property Capacity: Integer; Description Use this property to set the upper limit for the number of key gradient points.
Page 779 of 938
TdxGPBrushGradientPoints.Clear TdxGPBrushGradientPoints Removes all previously created key points from the gradient line. procedure Clear; Description This procedure can be useful if you need to repopulate the gradient line with new key points. The Count property returns 0 after a call of the Clear method. To remove a specific key point from the gradient line, invoke the Delete procedure instead.
Page 780 of 938
TdxGPBrushGradientPoints.Colors TdxGPBrushGradientPoints An array containing the TdxAlphaColor color values of the key points on the gradient line. type TdxAlphaColor = type DWORD; property Colors[Index: Integer]: TdxAlphaColor; Description Use this property to either assign or change the color of individual key points on the gradient line. The color values stored by the Colors property correspond to the same-indexed values stored by the Offsets property. The Index parameter specifies the gradient point’s zero-based index within the array.
A line, passing on the perpendicular through an individual key point on the gradient line, is painted with the same color as a gradient point. An individual gradient area, bound by two such lines and/or brush area borders, is painted with interpolated colors:
If one of the created key points does not match either the beginning or end of the gradient line, another "virtual" gradient point is created at the respective end of the line. Therefore, each perpendicular colored line, corresponding to an individual key gradient point, delimits two individual gradient areas:
Page 781 of 938
Page 782 of 938
TdxGPBrushGradientPoints.Count TdxGPBrushGradientPoinrs Returns the current number of key points on the gradient line. property Count: Integer; Description Use this property to identify the number of key points created for this linear gradient. The Count property is useful for indexed accessing of color and position values of individual key gradient points. The Count property value does not reflect the "virtual" edge key gradient points, created when no actual key point matches the beginning and/or end of the gradient line:
ReadOnly Property
Page 783 of 938
TdxGPBrushGradientPoints.Delete TdxGPBrushGradientPoints Removes a specified key point from the gradient line. procedure Delete(Index: Integer); Description Call this procedure to remove a specific key point from the gradient line. The Index parameter identifies the key point you need to delete. Each call of the Delete method decreases the Count property value by one. To remove all key points from the gradient line immediately, invoke the Clear procedure instead.
Page 784 of 938
TdxGPBrushGradientPoints.InvertOrder TdxGPBrushGradientPoints Inverts the position order of the key points on the gradient line. procedure InvertOrder; Description Use this method to rearrange the key points on the gradient line in the inverse order:
Page 785 of 938
TdxGPBrushGradientPoints.Offsets TdxGPBrushGradientPoints An array containing the offset values of the key points on the gradient line. property Offsets[Index: Integer]: Single; Description The values stored by the Offsets property correspond to the same-indexed values stored within the Colors property. The Index parameter specifies the gradient point’s zero-based index in the array. An individual offset value determines the relative position of the key point on the gradient line connecting the opposite boundaries or corners of an area painted by the brush. An offset value ranges from 0 to 1 (which corresponds to the key gradient point’s position between the beginning and the end of the gradient line):
The actual direction of the gradient line is determined by the value of the GradientMode property implemented in the TdxGPBrush class. Use the Offsets property to identify and/or change the position of an existing gradient point on the gradient line.
Page 786 of 938
TdxGPBrush.Color TdxGPBrush Specifies the solid color of the brush. type TdxAlphaColor = type DWORD; property Color: TdxAlphaColor; Description Use this property to assign the TdxAlphaColor color value which is used to fill the brush area. The Color property is in effect only if the Style property is set to gpbsSolid.
Page 787 of 938
TdxGPBrush.GradientMode TdxGPBrush Specifies the direction of the gradient line in the area painted by the brush. type TdxGPBrushGradientMode = (gpbgmHorizontal, gpbgmVertical, gpbgmForwardDiagonal, gpbgmBackwardDiagonal); property GradientMode: TdxGPBrushGradientMode; Description Use this property to choose one of the available directions of the line on which the key gradient points are located. Manage the list of gradient points by using the GradientPoints property. Refer to the TdxGPBrushGradientMode type description for the full list of available directions of the gradient line passing through the painted region. Note: The GradientMode property value is taken into account only if the Style property is set to gpbsGradient.
Page 788 of 938
TdxGPBrush.GradientPoints TdxGPBrush Provides access to the gradient line for the brush gradient painting mode. property GradientPoints: TdxGPBrushGradientPoints; Description Use this property to manage the list of key gradient points and change both the position and color of individual gradient points. Refer to the TdxGPBrushGradientPoints class description for more information. Note: The GradientPoints property is in effect only if the Style property is set to gpbsGradient.
Page 789 of 938
TdxGPBrush.IsEmpty TdxGPBrush Returns the value indicating whether the brush is actually painted. property IsEmpty: Boolean; Description Use this property to identify whether the surface, painted by the brush, is actually displayed. The IsEmpty property returns True if at least one of the following conditions is met:
l The created brush object’s properties have no assigned values; l The brush object’s property, which corresponds to the currently selected painting mode, has no valid value (for instance, if
the brush painting mode is set to gpbsSolid while the Color property is unassigned); l The brush painting mode is set to gpbsClear.
Note: Even when the IsEmpty property returns False, the brush can be effectively invisible due to specific painting settings. For instance, the brush can be filled with the solid color whose alpha is set to 0. ReadOnly Property
Page 790 of 938
TdxGPBrush.Style TdxGPBrush Specifies the brush painting mode. type TdxGPBrushStyle = (gpbsSolid, gpbsGradient, gpbsTexture, gpbsClear); property Style: TdxGPBrushStyle; Description Use this property to choose one of the painting modes provided by the brush. Refer to the TdxGPBrushStyle type description for the full list of available brush painting modes. Note: Set the Style property to gpbsClear to disable the surface painting.
Page 791 of 938
TdxGPBrush.Texture TdxGPBrush Specifies an image used as texture to fill the brush. property Texture: TdxGPImage; Description In addition to the solid and gradient fill modes, the brush allows you to fill a surface with a certain texture. The Texture property allows you to set an image as the texture source as well as its properties. If the source image dimensions exceed the brush area size, the picture is cropped to fit in the brush’s bounds. Otherwise, the brush area is filled with the source image instances as tiles:
Use the TdxSmartImage format for the texture source image. Refer to the code example below which illustrates how to fill a floating shape with the texture in the ExpressSpreadSheet control: // Delphi var ATexture: TdxSmartImage; AContainer: TdxSpreadSheetShapeContainer; OpenDialog1: TOpenDialog; //... // Creating the source image object ATexture := TdxSmartImage.Create; // Invoking the dialog window to select a source image file OpenDialog1.Execute(Handle); // Loading the seleced source image file ATexture.LoadFromFile(OpenDialog1.FileName); // Switching the brush painting to the texture fill mode AContainer.Shape.Brush.Style := gpbsTexture; // Assigning the loaded file as a source of the texture for filling a shape AContainer.Shape.Brush.Texture := ATexture; // Freeing the used source image ATexture.Free;
// C++Builder TdxSmartImage *ATexture; TdxSpreadSheetShapeContainer *AContainer; TOpenDialog *OpenDialog1; //... // Creating the source image object ATexture = new TdxSmartImage; // Invoking the dialog window to select a source image file OpenDialog1->Execute(Handle); // Loading the selected source image file ATexture->LoadFromFile(OpenDialog1->FileName); // Switching the brush painting to the texture fill mode AContainer->Shape->Brush->Style = gpbsTexture;
Page 792 of 938
// Assigning the loaded file as a source of the texture for filling a shape AContainer->Shape->Brush->Texture = ATexture; // Freeing the used source image ATexture->Free();
To customize the actual appearance of the texture on a surface painted by the brush, use the texture’s methods, such as Texture.Resize and Texture.Scale. Note: The Texture property is in effect only if the Style property is set to gpbsTexture.
Page 793 of 938
TdxGPCustomBrush.SetTargetRect TdxGPCustomBrush Help is not yet available. Overloaded Variants procedure SetTargetRect(const R: TRect); procedure SetTargetRect(const R: TdxRectF); procedure SetTargetRect(const R: TdxGpRect); procedure SetTargetRect(const R: TdxGpRectF); Description Help is not yet available.
Page 794 of 938
TdxGPCustomBrush.TargetRect TdxGPCustomBrush Help is not yet available. property TargetRect: TdxGpRectF; Description Help is not yet available. ReadOnly Property
Page 795 of 938
TdxGPImage.Clear TdxGPImage Releases resources and a handle associated with the stored image. procedure Clear; virtual; Description After the call of the Clear procedure, the HandleAllocated property returns False.
Page 796 of 938
TdxGPImage.ClientRect TdxGPImage Determines the image’s bounding rectangle. property ClientRect: TRect; ReadOnly Property
Page 797 of 938
TdxGPImage.Clone TdxGPImage Creates a new image object and copies the contents of the image into the newly created object. function Clone: TdxGPImage; virtual;
Page 798 of 938
TdxGPImage.Compare TdxGPImage Compares the image currently stored with a specified image. function Compare(AImage: TdxGPImage): Boolean; virtual; Description Use this function to compare the currently stored image and an image specified as the AImage parameter. The Compare function compares both the size and bitmap colors of two images. The Compare method returns True if images are identical; otherwise – False.
Page 799 of 938
TdxGPImage.CreateFromBitmap TdxGPImage Creates an image object using ABitmap. constructor CreateFromBitmap(ABitmap: TBitmap); virtual; Description ABitmap specifies the bitmap from which the image object will be created.
Page 800 of 938
TdxGPImage.CreateFromBits TdxGPImage Creates an image object using image bits. constructor CreateFromBits(AWidth, AHeight: Integer; const ABits: TRGBColors; AHasAlphaChannel: Boolean); virtual; Description AWidth and AHeight specify the image size. ABits specifies the image bits from which the image object will be created. AHasAlphaChannel specifies the image transparency. Set AHasAlphaChannel to True to support transparency.
Page 801 of 938
TdxGPImage.CreateFromStream TdxGPImage Creates an image object using AStream. constructor CreateFromStream(AStream: TStream); virtual; Description AStream specifies the stream from which the image will be loaded.
Page 802 of 938
TdxGPImage.GetAsBitmap TdxGPImage Creates a bitmap from the image. function GetAsBitmap: TBitmap; virtual;
Page 803 of 938
TdxGPImage.GetBitmapBits TdxGPImage Returns bitmap bits of the image. function GetBitmapBits: TRGBColors;
Page 804 of 938
TdxGPImage.Handle TdxGPImage An image instance handle. type GpImage = Pointer; property Handle: GpImage; Description The Clear procedure deletes the image object and frees the Handle associated with it. To identify whether the handle is pointing to the valid image instance, use the HandleAllocated property. ReadOnly Property
Page 805 of 938
TdxGPImage.HandleAllocated TdxGPImage Returns the value indicating whether the handle actually points to the image object within the system memory. property HandleAllocated: Boolean; Description This property returns True if the image instance is actually created. If the Handle does not point to the valid image object within the system memory, the HandleAllocated property returns False. Note: The HandleAllocated property returns False after invoking the Clear procedure. ReadOnly Property
Page 806 of 938
TdxGPImage.ImageDataFormat TdxGPImage Specifies the actual format of the stored image. type TdxImageDataFormat = (dxImageUnknown, dxImageBitmap, dxImageJpeg, dxImagePng, dxImageTiff, dxImageGif, dxImageEmf, dxImageExif, dxImageIcon, dxImageMemoryBmp, dxImageWmf); property ImageDataFormat: TdxImageDataFormat; Description You can use the ImageDataFormat property for the following purposes:
l Identify the actual bitmap format of the image stored in either the TdxGPImage or TdxSmartImage object; l Freely convert the currently stored image between all bitmap formats supported by the TdxGPImage and TdxSmartImage
classes.
For the full list of the supported image formats, refer to the TdxImageDataFormat type description.
Page 807 of 938
TdxGPImage.IsAlphaUsed TdxGPImage Returns the value indicating whether the stored bitmap image is transparent. property IsAlphaUsed: Boolean; Description Use this property to identify whether the bitmap image, stored in the TdxSmartImage object, has transparent pixels. The IsAlphaUsed property returns True if the image is translucent; otherwise – False. Note: The MakeComposition function can return transparent images. ReadOnly Property
Page 808 of 938
TdxGPImage.LoadFromBits TdxGPImage Overrides the image using specified image bits. procedure LoadFromBits(AWidth, AHeight: Integer; const ABits: TRGBColors; AHasAlphaChannel: Boolean); Description AWidth and AHeight specify the image size. ABits specifies the image bits from which the image object will be created. AHasAlphaChannel specifies the image transparency. Set AHasAlphaChannel to True to support transparency. Note: The HandleAllocated property returns True after the LoadFromBits procedure call, even if the image Handle was previously invalid.
Page 809 of 938
TdxGPImage.LoadFromResource TdxGPImage Overrides the image using the specified resource. procedure LoadFromResource(AInstance: THandle; const AResName: string; AResType: PChar); Description AInstance specifies the resource handle. AResName specifies the resource name. AResType specifies the resource type. Note: The HandleAllocated property returns True after the LoadFromResource procedure call, even if the image Handle was previously invalid.
Page 810 of 938
TdxGPImage.MakeComposition TdxGPImage Blends two images using the alpha channel. Overloaded Variants function MakeComposition(AOverlay: TdxGPImage; AOverlayAlpha: Byte): TdxGPImage; function MakeComposition(AOverlay: TdxGPImage; AOverlayAlpha, ASourceAlpha: Byte): TdxGPImage; Description Both of the MakeComposition overloaded functions allow you to paint an image, specified as the AOverlay parameter, on top of the current image. The resulting blended image is returned as the TdxGPImage object in both of the MakeComposition functions. The AOverlayAlpha parameter sets the transparency level of the overlay image, therefore the underlying image can be partially visible. In addition to the transparency level of the overlay image, the second overloaded MakeComposition function accepts the alpha value of the base image as the ASourceAlpha parameter, thus allowing you to make the returned image translucent. Note: To identify whether the image has transparent pixels, use the IsAlphaUsed property.
Page 811 of 938
TdxGPImage.Resize TdxGPImage Resizes the image according to the specified absolute width and height values (in pixels). Overloaded Variants procedure Resize(const AWidth, AHeight: Integer); virtual; procedure Resize(const ASize: TSize); Description Both overloaded variants of the Resize procedure can either upscale or downscale the image to the specified dimension values:
l The first overloaded Resize procedure allows you to assign the new width and height of the image (in pixels) as the AWidth and AHeight parameters, respectively;
l The second overloaded Resize procedure accepts new image dimensions as the single ASize parameter.
Note: Both variants of the Resize procedure impose no restrictions on the aspect ratio of the resized image. If you need to resize the image without changing its height-to-width ratio, use the Scale procedure instead.
Page 812 of 938
TdxGPImage.SaveToStreamByCodec TdxGPImage Persists the image with streams by an encoder. type TdxImageDataFormat = (dxImageUnknown, dxImageBitmap, dxImageJpeg, dxImagePng, dxImageTiff, dxImageGif, dxImageEmf, dxImageExif, dxImageIcon, dxImageMemoryBmp, dxImageWmf); procedure SaveToStreamByCodec(AStream: TStream; AImageFormat: TdxImageDataFormat); Description AStream specifies the target stream. AImageFormat specifies the image format whose associated encoder is used. Refer to the TdxImageDataFormat type description for the full list of supported image formats. Note: A call to the SaveToStreamByCodec method raises an exception if the BMP, PNG, GIF, JPEG, or TIFF codec is not registered or disabled in the OS, and the corresponding image format is passed as the AImageFormat method parameter.
Page 813 of 938
TdxGPImage.Scale TdxGPImage Resizes the image while keeping its aspect ratio. procedure Scale (const M, D: Integer); Description Use this procedure to either upscale or downscale the image without changing its height-to-width ratio. The new relative size of the image is the common fraction whose multiplier and divider are specified as the M and D parameters, respectively. Therefore, to upscale the image, the multiplier value must exceed the divider value. Otherwise, the image is downscaled accordingly. The following code example illustrates how to invoke the Scale procedure to scale the image to twice its original size: // Delphi var AImage: TdxSmartImage; OpenDialog1: TOpenDialog; //... // Creating the image object AImage := TdxSmartImage.Create; // Opening an image for scaling OpenDialog1.Execute(Handle); AImage.LoadFromFile(OpenDialog1.FileName); // Doubling the image’s dimensions AImage.Scale(2, 1); // The multiplier is set to 2; the divider is set to 1
// C++Builder TdxSmartImage *AImage; TOpenDialog *OpenDialog1; //... // Creating the image object AImage = new TdxSmartImage; // Opening an image for scaling OpenDialog1->Execute(Handle); AImage->LoadFromFile(OpenDialog1->FileName); // Doubling the image’s dimensions AImage->Scale(2, 1); // The multiplier is set to 2; the divider is set to 1
The following example of the Scale procedure call shows how to downscale the image to two thirds of its original dimensions: // Delphi AImage.Scale(2, 3); // The multiplier is set to 2; the divider is set to 3
// C++Builder AImage->Scale(2, 3); // The multiplier is set to 2; the divider is set to 3
Note: If you need to either upscale or downscale the image to the specific dimensions, use the Resize procedure instead.
Page 814 of 938
TdxGPImage.SetBitmap TdxGPImage Overrides the image using the specified bitmap. procedure SetBitmap(ABitmap: TBitmap); virtual; Description ABitmap specifies the bitmap from which the image will be created. Note: The HandleAllocated property returns True after the SetBitmap procedure call even if the image Handle was previously invalid.
Page 815 of 938
TdxGPImage.Size TdxGPImage Returns the current dimensions of the image stored in the TdxGPImage object. property Size: TSize; Description Use this property to identify the current absolute width and height of the image (in pixels). To resize the image, use the Resize and Scale procedures. ReadOnly Property
Page 816 of 938
TdxGPImage.StretchDraw TdxGPImage Paints the image within a destination rectangle. procedure StretchDraw(DC: HDC; const ADest, ASource: TRect; AAlpha: Byte = 255); procedure StretchDraw(DC: HDC; const ADest: TRect; AAlpha: Byte = 255); Description The StretchDraw method resizes the image to completely fill the destination rectangle. Note that the image is properly resized if its initial dimensions (height and width) are two or more pixels. The overload copies the ASource image fragment into the ADest rectangle. DC specifies a handle to the device context. ADest and ASource specify a destination and source rectangles.
Page 817 of 938
TdxGPPen.Brush TdxGPPen Specifies the settings of the brush used to paint the line. property Brush: TdxGPBrush; Description Use this property to set the line’s brush parameters, including the painting mode and accompanying settings, including but not limited to, the color, gradient mode, and filling texture. The Brush property settings are applied to the line painting style specified by the Style property. Refer to the TdxGPBrush class description for more information.
Page 818 of 938
TdxGPPen.HandleNeeded TdxGPPen Creates a line object handle if it does not already exist. procedure HandleNeeded; override; Description Call this procedure to create a screen object for the line. If the respective screen object already exists, invoking the HandleNeeded procedure has no effect.
Page 819 of 938
TdxGPPen.IsEmpty TdxGPPen Returns a value indicating the current drawing status of the line object. property IsEmpty: Boolean; Description The IsEmpty property returns True if either the Width property is set to 0 or the Brush.IsEmpty returns True. ReadOnly Property
Page 820 of 938
TdxGPPen.SetTargetRect TdxGPPen Sets the actual area painted by the brush. Overloaded Variants procedure SetTargetRect(const R: TdxGpRect); inline; procedure SetTargetRect(const R: TRect); inline; procedure SetTargetRect(const R: TdxRectF); inline;
Description Help is not yet available
Page 821 of 938
TdxGPPen.Style TdxGPPen Specifies the pattern of the painted line. type
TdxGPPenStyle = (gppsSolid, gppsDash, gppsDot, gppsDashDot, gppsDashDotDot); property Style: TdxGPPenStyle; Description Use this property to assign a required line painting style, including but not limited to, the solid, dashed, dotted, and mixed patterns. The line painting pattern, specified via the Style property, is filled by the brush with parameters assigned by using the Brush property. Refer to the TdxGPPenStyle type description for the full list of available line painting patterns.
Page 822 of 938
TdxGPPen.Width TdxGPPen Specifies the absolute width (in pixels) of the painted line. property Width: Single; Description If a fractional value is assigned to the Width property, it is rounded down to the nearest integer value to calculate the absolute width of the drawn line (in pixels). The thinnest displayed line has a pixel width of one, even if the Width property has a zero or negative value. To assign a specific pattern to the painted line, use the Style property. Note: If the Width property is set to 0, the IsEmpty property returns True.
Page 823 of 938
TdxBMPImage Methods TdxBMPImage Legend Derived from TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 824 of 938
TdxGIFImage Methods TdxGIFImage Legend Derived from TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 825 of 938
TdxGPBrush Methods TdxGPBrush Legend Derived from TdxGPCustomBrush SetTargetRect
Page 826 of 938
TdxGPCustomBrush Methods TdxGPCustomBrush Legend In TdxGPBrush SetTargetRect
Page 827 of 938
TdxGPImage Methods TdxGPImage Legend In TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 828 of 938
TdxGPPen Methods TdxGPPen Legend In TdxGPPen HandleNeeded SetTargetRect
Page 829 of 938
TdxJPEGImage Methods TdxJPEGImage Legend Derived from TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 830 of 938
TdxPNGImage Methods TdxPNGImage Legend Derived from TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 831 of 938
TdxSmartGlyph Methods TdxSmartGlyph Legend Derived from TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 832 of 938
TdxSmartImage Methods TdxSmartImage Legend Derived from TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 833 of 938
TdxTIFFImage Methods TdxTIFFImage Legend Derived from TdxGPImage Clear Clone Compare CreateFromBitmap CreateFromBits CreateFromStream GetAsBitmap GetBitmapBits LoadFromBits LoadFromResource MakeComposition Resize SaveToStreamByCodec Scale SetBitmap StretchDraw
Page 834 of 938
TdxBMPImage Properties TdxBMPImage Legend Derived from TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 835 of 938
TdxGIFImage Properties TdxGIFImage Legend Derived from TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 836 of 938
TdxGPBrush Properties TdxGPBrush Legend In TdxGPBrush Color GradientMode GradientPoints IsEmpty Style Texture Derived from TdxGPCustomBrush TargetRect
Page 837 of 938
TdxGPBrushGradientPoints Properties TdxGPBrushGradientPoints Legend In TdxGPBrushGradientPoints Color GradientMode GradientPoints IsEmpty Style Texture
Page 838 of 938
TdxGPCustomBrush Properties TdxGPCustomBrush Legend In TdxGPCustomBrush TargetRect
Page 839 of 938
TdxGPImage Properties TdxGPImage Legend In TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 840 of 938
TdxGPPen Properties TdxGPPen Legend In TdxGPPen Brush Style Width IsEmpty
Page 841 of 938
TdxJPEGImage Properties TdxJPEGImage Legend Derived from TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 842 of 938
TdxPNGImage Properties TdxPNGImage Legend Derived from TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 843 of 938
TdxSmartGlyph Properties TdxSmartGlyph Legend Derived from TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 844 of 938
TdxSmartImage Properties TdxSmartImage Legend Derived from TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 845 of 938
TdxTIFFImage Properties TdxTIFFImage Legend Derived from TdxGPImage ClientRect Handle HandleAllocated ImageDataFormat IsAlphaUsed Size
Page 846 of 938
Hierarchy TGraphic | TdxGPImage | TdxSmartImage | TdxBMPImage
Page 847 of 938
Hierarchy TGraphic | TdxGPImage | TdxSmartImage | TdxGIFImage
Page 848 of 938
Hierarchy TObject | TdxGpBase | TdxGPBrushGradientPoints
Page 849 of 938
Hierarchy TObject | TdxGpBase | TdxGPCustomGraphicObject | TdxGPCustomBrush | TdxGPBrush
Page 850 of 938
Hierarchy TObject | TdxGpBase | TdxGPCustomGraphicObject | TdxGPCustomBrush
Page 851 of 938
Hierarchy TGraphic | TdxGPImage
Page 852 of 938
Hierarchy TObject | TdxGpBase | TdxGPCustomGraphicObject | TdxGPPen
Page 853 of 938
Hierarchy TGraphic | TdxGPImage | TdxSmartImage | TdxJPEGImage
Page 854 of 938
Hierarchy TGraphic | TdxGPImage | TdxSmartImage | TdxPNGImage
Page 855 of 938
Hierarchy TGraphic | TdxGPImage | TdxSmartImage | TdxSmartGlyph
Page 856 of 938
Hierarchy TGraphic | TdxGPImage | TdxSmartImage
Page 857 of 938
Hierarchy TGraphic | TdxGPImage | TdxSmartImage | TdxTIFFImage
Page 858 of 938
TdxScreenTipFooterBand Object Hierarchy Properties The TdxScreenTipFooterBand class implements the ScreenTip’s footer section that can be defined on a set of ScreenTips. Unit dxScreenTip TdxScreenTipFooterBand = class(TdxCustomScreenTipBand) Description A ScreenTip window is split into three sections – header, description, and footer.
These sections are of type TdxScreenTipBand, and proprietary to each ScreenTip. If an application needs to display footer information common to a number of ScreenTips, use the ScreenTip repository’s StandardFooter property (instead of the ScreenTip’s Footer property), and toggle the UseStandardFooter property of specific ScreenTips to show this information.
Page 859 of 938
TdxCustomScreenTipBand.BandType TdxCustomScreenTipBand Specifies the ScreenTip’s section to which section settings will be applied. type TdxScreenTipBandType = (stbHeader, stbDescription, stbFooter); TdxScreenTipRepositoryFonts = set of TdxScreenTipBandType; property BandType: TdxScreenTipBandType;
Page 860 of 938
TdxCustomScreenTipBand.Font TdxCustomScreenTipBand See Also Gets font settings for the descriptive text displayed in the ScreenTip section. property Font: TFont; Description The Font property returns font settings that depend upon settings are currently applied to the string – either TdxScreenTipRepository‘s or system font options (see the ScreenTip repository’s AssignedFonts property). ReadOnly Property
Page 861 of 938
TdxCustomScreenTipBand.Glyph TdxCustomScreenTipBand Specifies the explanatory image for the ScreenTip section. property Glyph: TBitmap; Description Use the GlyphFixedWidth property to specify if the provided image has to be resized to meet the width requirements outlined in the Microsoft® Office® 2007 UI guidelines. The image is displayed in the ScreenTip section along with the descriptive text (see the Text property).
Use the TextAlign property to align the image and the text.
Page 862 of 938
TdxCustomScreenTipBand.GlyphFixedWidth TdxCustomScreenTipBand Specifies if the ScreenTip section’s explanatory image is resized to meet the width requirements outlined in the Microsoft® Office® 2007 UI guidelines. property GlyphFixedWidth: Boolean; Description Set this property to False to let the specified image retain its original width. Otherwise, the image is proportionally resized to force its width to meet the requirements outlined in the guidelines. At design time, you can switch the GlyphFixedWidth property for each ScreenTip section image by invoking its context menu in the ScreenTip repository editor and clicking the "Fixed Width" menu item. The screenshot below shows the context menu invoked for the description section’s image.
The default value of the GlyphFixedWidth property is True.
Page 863 of 938
TdxCustomScreenTipBand.Text TdxCustomScreenTipBand Specifies the descriptive text for the ScreenTip section. property Text: string; Description The specified text is a description of the control’s intended purpose. This text can be used along with the specified explanatory image (see the Glyph property).
Use the TextAlign property to align the image and the text.
Page 864 of 938
TdxCustomScreenTipBand.TextAlign TdxCustomScreenTipBand Specifies the descriptive text’s position relative to an explanatory image in the ScreenTip section. type TdxScreenTipBandTextAlign = (stbtaLeft, stbtaRight); property TextAlign: TdxScreenTipBandTextAlign; Description Use this property to specify the position of the descriptive text – it can be positioned to the left (the TextAlign property is stbtaLeft) or to the right (the TextAlign property is stbtaRight) of the explanatory image in the ScreenTip window. The default value of the TextAlign property is stbtaRight.
Page 865 of 938
TdxCustomScreenTipLinks.ScreenTipStyle TdxCustomScreenTipLinks Provides access to the ScreenTip style settings applied to the links stored by the collection. property ScreenTipStyle: TdxScreenTipStyle; ReadOnly Property
Page 866 of 938
TdxCustomScreenTipLink.ScreenTip TdxCustomScreenTipLink Specifies the ScreenTip for the link. property ScreenTip: TdxScreenTip;
Page 867 of 938
TdxScreenTipActionLinks.Add TdxScreenTipActionLinks Creates a new ScreenTip link and appends it to the collection. function Add: TdxScreenTipActionLink; Description The created ScreenTip link is returned as the function’s result.
Page 868 of 938
TdxScreenTipActionLinks.FindScreenTipByAction TdxScreenTipActionLinks Searches the collection for a ScreenTip linked to a specified hinted control. function FindScreenTipByAction(AAction: TBasicAction): TdxScreenTip; Description This function searches the first ScreenTip link whose Control.Action property value matches AAction and returns the link’s ScreenTip property value as the function’s result. If no match is found, the function returns nil.
Page 869 of 938
TdxScreenTipActionLinks.Items TdxScreenTipActionLinks Provides zero-based indexed access to individual ScreenTip links contained within the collection. property Items[Index: Integer]: TdxScreenTipActionLink;
Page 870 of 938
TdxScreenTipActionLink.Action TdxScreenTipActionLink See Also Specifies the action associated with a ScreenTip. property Action: TBasicAction; Description Use the ScreenTip property to link the specified Action to a ScreenTip.
Page 871 of 938
TdxScreenTipBand.ScreenTip TdxScreenTipBand References a ScreenTip that contains the currently processed section. property ScreenTip: TdxScreenTip; ReadOnly Property
Page 872 of 938
TdxScreenTipCollection.Add TdxScreenTipCollection Adds a new ScreenTip at the end of the ScreenTip collection. function Add: TdxScreenTip; Description The Add method returns a reference to the newly created ScreenTip.
Page 873 of 938
TdxScreenTipCollection.Items TdxScreenTipCollection Provides indexed access to the ScreenTip at the position specified by the zero-based Index parameter. property Items[Index: Integer]: TdxScreenTip; Description The collection contains control ScreenTips created both at design and run-time.
Page 874 of 938
TdxScreenTipCollection.Repository TdxScreenTipCollection Represents the ScreenTip repository. property Repository: TdxScreenTipRepository; Description A ScreenTip repository is a component used for storing information on control ScreenTips. It wraps the ScreenTip collection (see the repository’s Items property) and provides the following ScreenTip-specific settings:
l DescriptionFont property – represents font settings for a descriptive text displayed in the ScreenTip window’s description section.
l FooterFont property – represents font settings for a descriptive text displayed in the ScreenTip window’s footer section. l HeaderFont property – represents font settings for a descriptive text displayed in the ScreenTip window’s header section. l AssignedFonts property – activates font settings specified by the above properties. l ShowDescription property – specifies whether to show an enhanced ScreenTip.
StandardFooter property – provides settings for a ScreenTip window’s footer section common to a number of ScreenTips. To apply settings specified by this property to a particular ScreenTip, set the ScreenTip’s UseStandardFooter property to True. ReadOnly Property
Page 875 of 938
TdxScreenTipFooterBand.Repository TdxScreenTipFooterBand References the ScreenTip repository. property Repository: TdxScreenTipRepository; Description A ScreenTip repository is a component used for storing information on control ScreenTips. It wraps the ScreenTip collection (see the repository’s Items property), and provides the following ScreenTip-specific settings:
l DescriptionFont property – represents font settings for a descriptive text displayed in the ScreenTip window’s description section.
l FooterFont property – represents font settings for a descriptive text displayed in the ScreenTip window’s footer section. l HeaderFont property – represents font settings for a descriptive text displayed in the ScreenTip window’s header section. l AssignedFonts property – activates font settings specified by the above properties. l ShowDescription property – specifies whether to show an enhanced ScreenTip.
StandardFooter property – provides settings for a ScreenTip window’s footer section common to a number of ScreenTips. To apply settings specified by this property to a particular ScreenTip, set the ScreenTip’s UseStandardFooter property to True. ReadOnly Property
Page 876 of 938
TdxScreenTipLinks.Add TdxScreenTipLinks Creates a new ScreenTip link and appends it to the collection. function Add: TdxScreenTipLink; Description The created ScreenTip link is returned as the function’s result.
Page 877 of 938
TdxScreenTipLinks.FindScreenTipByControl TdxScreenTipLinks Searches the collection for a ScreenTip linked to a specified hinted control. function FindScreenTipByControl(AControl: TControl): TdxScreenTip; Description This function searches the first ScreenTip link whose Control property value matches AControl and returns the link’s ScreenTip property value as the function’s result. If no match is found, the function returns nil.
Page 878 of 938
TdxScreenTipLinks.Items TdxScreenTipLinks Provides zero-based indexed access to individual ScreenTip links contained within the collection. property Items[Index: Integer]: TdxScreenTipLink;
Page 879 of 938
TdxScreenTipLink.Control TdxScreenTipLink Specifies the hinted control that is associated with a ScreenTip. property Control: TControl; Description Use the ScreenTip property to link the specified Control to a ScreenTip.
Page 880 of 938
TdxScreenTipRepository.AssignedFonts TdxScreenTipRepository Activates font settings to be applied to a descriptive text shown in the specified sections of the ScreenTip window. type TdxScreenTipBandType = (stbHeader, stbDescription, stbFooter); TdxScreenTipRepositoryFonts = set of TdxScreenTipBandType; property AssignedFonts: TdxScreenTipRepositoryFonts; Description Set the corresponding flags to apply the font settings specified by the HeaderFont, DescriptionFont, and FooterFont properties to the text contained in the header, description, or footer section, respectively.
Note: if you modify font settings, the corresponding flags are automatically set on the AssignedFonts property. The default value of the AssignedFonts property is [].
Page 881 of 938
TdxScreenTipRepository.DescriptionFont TdxScreenTipRepository See Also Specifies the font settings applied to a descriptive text displayed in a ScreenTip window’s description section. property DescriptionFont: TFont; Description A descriptive text to be shown in the description section is specified via the ScreenTip’s Decscription.Text property. Specified font settings are only applied if the stbDescription flag on the AssignedFonts property is active. Otherwise, system settings are used instead.
Page 882 of 938
TdxScreenTipRepository.FooterFont TdxScreenTipRepository See Also Specifies the font settings applied to a descriptive text displayed in a ScreenTip window’s footer section. property FooterFont: TFont; Description A descriptive text to be shown in the footer section is specified via the ScreenTip’s Footer.Text property. Specified font settings are only applied if the stbFooter flag on the AssignedFonts property is active. Otherwise, system settings are used instead.
Page 883 of 938
TdxScreenTipRepository.HeaderFont TdxScreenTipRepository See Also Specifies the font settings applied to a descriptive text displayed in a ScreenTip window’s header section. property HeaderFont: TFont; Description A descriptive text to be shown in the header section is specified via the ScreenTip’s Header.Text property. Specified font settings are only applied if the stbHeader flag on the AssignedFonts property is active. Otherwise, system settings are used instead.
Page 884 of 938
TdxScreenTipRepository.Items TdxScreenTipRepository Provides access to a collection of ScreenTips created both at design and runtime. property Items: TdxScreenTipCollection; Description This property provides a design-time editor that allows you to manage collection elements and customize their appearance settings. To invoke the collection editor, do one of the following:
l Switch to the Object Inspector and click the ellipsis button next to the Items property; l Double-click the repository component residing on a form; l Select Edit… in the repository component’s context menu.
At runtime, you can add a new ScreenTip to the collection using the collection’s Add method. To access individual ScreenTips, use the collection’s Items property.
Page 885 of 938
TdxScreenTipRepository.ShowDescription TdxScreenTipRepository See Also Specifies whether to show an enhanced or a standard ScreenTip. property ShowDescription: Boolean; Description An enhanced ScreenTip contains three sections – header, description, and footer. Each section can display an explanatory image and/or a descriptive text (see the section’s Glyph and Text properties).
A standard ScreenTip only shows a header section containing a descriptive text.
The ShowDescription property is applied to all ScreenTips contained in the repository. Set this property to True to use enhanced ScreenTips. Otherwise, standard ScreenTips will be displayed. Note: If a descriptive text is not specified for a particular control or a ScreenTip’s UseHintAsHeader property is set to True, a hint message (see the control’s Hint property) will be shown instead. The default value of the ShowDescription property is True.
Page 886 of 938
TdxScreenTipRepository.StandardFooter TdxScreenTipRepository See Also Specifies footer settings common to a number of ScreenTips. property StandardFooter: TdxScreenTipFooterBand; Description Each ScreenTip contains footer information provided by the proprietary Footer property. Some ScreenTips can contain standard footer information. In order to avoid repetition, you can specify footer information using the StandardFooter property. To display this information in specific ScreenTips, set their UseStandardFooter property to True.
Page 887 of 938
TdxScreenTipStyle.ScreenTipActionLinks TdxScreenTipStyle Specifies a collection of ScreenTip links to actions assigned to hinted controls. property ScreenTipActionLinks: TdxScreenTipActionLinks;
Page 888 of 938
TdxScreenTipStyle.ScreenTipLinks TdxScreenTipStyle Specifies a collection of ScreenTip links to hinted controls. property ScreenTipLinks: TdxScreenTipLinks;
Page 889 of 938
TdxScreenTip.Collection TdxScreenTip Provides access to the collection that owns the ScreenTip. property Collection: TdxScreenTipCollection; Description Refer to the TdxScreenTipCollection class description to learn how to manage collection contents. ReadOnly Property
Page 890 of 938
TdxScreenTip.Description TdxScreenTip See Also Represents settings for the ScreenTip window’s description section. property Description: TdxScreenTipBand; Description The ScreenTip window is split into three sections – header, description, and footer.
With the Description property, you can provide an explanatory image and/or descriptive text, and specify the text’s horizontal alignment for the description section, using the Description.Glyph, Description.Text, and Description.TextAlign sub-properties, respectively.
Page 891 of 938
TdxScreenTip.Footer TdxScreenTip See Also Represents settings for the ScreenTip window’s footer section. property Footer: TdxScreenTipBand; Description The ScreenTip window is split into three sections – header, description, and footer.
With the Footer property, you can provide an explanatory image and/or descriptive text, and specify the text’s horizontal alignment for the footer section, using the Footer.Glyph, Footer.Text, and Footer.TextAlign sub-properties, respectively.
Page 892 of 938
TdxScreenTip.Header TdxScreenTip See Also Represents settings for the ScreenTip window’s header section. property Header: TdxScreenTipBand; Description The ScreenTip window is split into three sections – header, description, and footer.
With the Header property, you can provide an explanatory image and/or descriptive text, and specify the text’s horizontal alignment for the header section, using the Header.Glyph, Header.Text, and Header.TextAlign sub-properties, respectively.
Page 893 of 938
TdxScreenTip.UseHintAsHeader TdxScreenTip See Also Specifies whether header information is provided by the control’s Hint property. property UseHintAsHeader: Boolean; Description Generally, information in the ScreenTip’s header section is specified via the ScreenTip’s Header property. To avoid repetition if there is no specific header information, you can show a hint message here (specified by the control’s Hint property). To do this, set the UseHintAsHeader property to True. The default value of the UseHintAsHeader property is False.
Page 894 of 938
TdxScreenTip.UseStandardFooter TdxScreenTip See Also Specifies whether to display footer information provided by the ScreenTip repository’s StandardFooter property. property UseStandardFooter: Boolean; Description Some ScreenTips can contain standard footer information. In order to avoid repetition, you can specify footer information via the ScreenTip repository’s StandardFooter property for these ScreenTips. To apply footer details specified by the StandardFooter property to the currently processed ScreenTip, set the UseStandardFooter property to True. The default value of the UseStandardFooter property is False.
Page 895 of 938
TdxScreenTip.Width TdxScreenTip Specifies the width of the currently processed ScreenTip. property Width: Integer; Description If the Width property is set to 0, the ScreenTip’s width is calculated automatically. The calculated value depends upon whether an explanatory image in the ScreenTip’s description section is provided. If so, the ScreenTip’s window is 318 pixels wide. Otherwise, the window’s width is 210 pixels. The default value of the Width property is 0.
Page 896 of 938
TdxScreenTipRepositoryFonts type See Also Enumerates ScreenTip sections to which font settings will be applied. Unit dxScreenTip type TdxScreenTipBandType = (stbHeader, stbDescription, stbFooter); TdxScreenTipRepositoryFonts = set of TdxScreenTipBandType; Description Values include:
Value Meaning
stbHeader The header section of the ScreenTip window
stbDescription The description section of the ScreenTip window
stbFooter The footer section of the ScreenTip window
Page 897 of 938
TdxScreenTip Methods TdxScreenTip Legend Derived from TcxComponentCollectionItem AddToCollection GetParentComponent RemoveFromCollection SetParentComponent
Page 898 of 938
TdxScreenTipActionLinks Methods TdxScreenTipActionLinks Legend In TdxScreenTipActionLinks Add FindScreenTipByAction
Page 899 of 938
TdxScreenTipCollection Methods TdxScreenTipCollection Legend In TdxScreenTipCollection Add Derived from TcxComponentCollection Add BeginUpdate Clear Delete EndUpdate FindItemByID IndexOf Insert Remove Update
Page 900 of 938
TdxScreenTipLinks Methods TdxScreenTipLinks Legend In TdxScreenTipLinks Add FindScreenTipByControl
Page 901 of 938
TdxCustomScreenTipBand Properties TdxCustomScreenTipBand Legend In TdxCustomScreenTipBand BandType Font Glyph GlyphFixedWidth Text TextAlign
Page 902 of 938
TdxCustomScreenTipLink Properties TdxCustomScreenTipLink Legend In TdxCustomScreenTipLink ScreenTip
Page 903 of 938
TdxCustomScreenTipLinks Properties TdxCustomScreenTipLinks Legend In TdxCustomScreenTipLinks ScreenTipStyle
Page 904 of 938
TdxScreenTip Properties TdxScreenTip Legend In TdxScreenTip Collection Description Footer Header UseHintAsHeader UseStandardFooter Width Derived from TcxComponentCollectionItem Collection ID Index
Page 905 of 938
TdxScreenTipActionLink Properties TdxScreenTipActionLink Legend In TdxScreenTipActionLink Action Derived from TdxCustomScreenTipLink ScreenTip
Page 906 of 938
TdxScreenTipActionLinks Properties TdxScreenTipActionLinks Legend In TdxScreenTipActionLinks Items Derived from TdxCustomScreenTipLinks ScreenTipStyle
Page 907 of 938
TdxScreenTipBand Properties TdxScreenTipBand Legend In TdxScreenTipBand ScreenTip Derived from TdxCustomScreenTipBand BandType Font Glyph GlyphFixedWidth Text TextAlign
Page 908 of 938
TdxScreenTipCollection Properties TdxScreenTipCollection Legend In TdxScreenTipCollection Items Repository Derived from TcxComponentCollection Count Items
Page 909 of 938
TdxScreenTipFooterBand Properties TdxScreenTipFooterBand Legend In TdxScreenTipFooterBand Repository Derived from TdxCustomScreenTipBand BandType Font Glyph GlyphFixedWidth Text TextAlign
Page 910 of 938
TdxScreenTipLink Properties TdxScreenTipLink Legend In TdxScreenTipLink Control Derived from TdxCustomScreenTipLink ScreenTip
Page 911 of 938
TdxScreenTipLinks Properties TdxScreenTipLinks Legend In TdxScreenTipLinks Items Derived from TdxCustomScreenTipLinks ScreenTipStyle
Page 912 of 938
TdxScreenTipRepository Properties TdxScreenTipRepository Legend In TdxScreenTipRepository AssignedFonts DescriptionFont FooterFont HeaderFont Items ShowDescription StandardFooter
Page 913 of 938
TdxScreenTipStyle Properties TdxScreenTipStyle Legend In TdxScreenTipStyle ScreenTipActionLinks ScreenTipLinks
Page 914 of 938
Hierarchy TPersistent | TdxCustomScreenTipBand
Page 915 of 938
Hierarchy TCollection | TdxCustomScreenTipLinks
Page 916 of 938
Hierarchy TCollectionItem | TdxCustomScreenTipLink
Page 917 of 938
Hierarchy TCollection | TdxCustomScreenTipLinks | TdxScreenTipActionLinks
Page 918 of 938
Hierarchy TCollectionItem | TdxCustomScreenTipLink | TdxScreenTipActionLink
Page 919 of 938
Hierarchy TPersistent | TdxCustomScreenTipBand | TdxScreenTipBand
Page 920 of 938
Hierarchy TPersistent | TcxComponentCollection | TdxScreenTipCollection
Page 921 of 938
Hierarchy TPersistent | TdxCustomScreenTipBand | TdxScreenTipFooterBand
Page 922 of 938
Hierarchy TCollection | TdxCustomScreenTipLinks | TdxScreenTipLinks
Page 923 of 938
Hierarchy TCollectionItem | TdxCustomScreenTipLink | TdxScreenTipLink
Page 924 of 938
Hierarchy TComponent | TdxScreenTipRepository
Page 925 of 938
Hierarchy TInterfacedPersistent | TcxInterfacedPersistent | TcxCustomHintStyle | TdxScreenTipStyle
Page 926 of 938
Hierarchy TComponent | TcxComponentCollectionItem | TdxScreenTip
Page 927 of 938
Skin Skins give you total freedom in look and feel customization. A skin contains bitmaps showing all control elements in their various states (normal, hot-tracked, selected, pressed, etc.) Since each control is painted using the corresponding bitmaps, the appearance of the entire skinned application does not generally depend on the Operating System. By using skins you can introduce the Windows® XP look and feel options in applications that are not running under the XP OS. With the ExpressSkins Library, you can add skin support to your applications built with Developer Express controls. Note that this library is not shipped as part of the Express Cross Platform Library and must be purchased separately.
Page 928 of 938
API Application Programming Interface (API) is an interface between an operating system and an application. It enables applications to communicate with the operating system and its services. For example, an API may make it possible for programs to create windows, display message boxes and use subsystems such as GDI.
Page 929 of 938
BCBCOMPATIBLE Conditional Symbol The BCBCOMPATIBLE symbol is used for conditional compilation of the DevExpress source code. This conditional symbol is IDE specific – it is defined for compilation under RAD Studio IDEs and is not defined for compilation under Delphi 7.
Page 930 of 938
Device Context One of the chief features of the Microsoft® Win32® application programming interface (API) is device independence. Win32-based applications can draw and print output on a variety of devices. The software supporting this device independence is contained in two dynamic-link libraries. The first, GDI32.DLL, is referred to as the graphics device interface (GDI); the second is referred to as a device driver. The name of the second depends on the device where an application draws output. For example, if an application draws output in the client area of its window on a VGA display, this library is VGA.DLL; if it prints output on an Epson® FX-80 printer, this library is EPSON9.DLL. An application must inform GDI of loading a particular device driver and, once the driver is loaded, to prepare a device for drawing operations (such as selecting the line color and width, the brush pattern and color, the font typeface and clipping region, etc.) This can be accomplished by creating and maintaining a device context. The device context is a structure that defines a set of graphic objects and their associated attributes, and the graphic modes affecting output. Graphic objects include:
· A pen for line drawing; · A brush for painting and filling; · A bitmap for copying or scrolling screen sections; · A palette for defining a set of available colors; · A region for clipping and other operations; · A path for painting and drawing operations.
Unlike most of the Win32 structures, applications do not have direct access to the device context; instead, they operate indirectly by calling various functions.
Page 931 of 938
GDI and GDI+ Libraries Graphics Device Interface (GDI) is a subsystem of the Microsoft® Windows® family of operating systems (since Microsoft® Windows® 95) and it is responsible for displaying information on screens and printers. GDI is an API that is exposed through a set of functions exported from the gdi32.dll file. A graphics device interface, such as GDI, allows application programmers to display information on a screen or printer without having to be concerned about the details of particular display devices. An application programmer makes calls to the methods provided by GDI, which in turn make appropriate calls to specific device drivers. GDI insulates applications from graphics hardware, thus allowing developers to create device-independent applications. GDI+ Library Starting with Microsoft® Windows® XP, operating systems provide GDI+ – a graphics subsystem that significantly extends the drawing capabilities provided by GDI. As the name suggests, GDI+ is a successor to GDI. The GDI+ API is exposed via a set of functions exported from the gdiplus.dll file. This file is included with Windows XP and later. GDI+ is available as a redistributable file for Windows 2000 Service Pack 4, Windows Server 2003 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Vista, Windows Vista Service Pack 1, Windows XP Service Pack 2, and Windows XP Service Pack 3. To download the latest redistributable file, visit http://www.microsoft.com/download/en/details.aspx?id=18909.
Page 932 of 938
HitTest HitTests are used to identify a control’s UI element by its position within this control. Every ViewInfo has a GetHitTest or HitTest method, which receives coordinates of a specific point within a control and returns the HitTest information of the control’s UI element whose bounding rectangle includes this point. In its turn, HitTest provides the ViewInfo information of the associated UI element. You can obtain a HitTest object either via the ViewInfo.GetHitTest method or via a corresponding property provided by some controls.
Page 933 of 938
Painter and Painter Class Each editing control (or UI element in sophisticated container controls) has its own painter – an object (a painter class instance) that paints a control on a specific canvas based on the control’s visual settings – colors, text styles, size, etc. Painter classes provide members that allow Developer Express controls to draw primitives when rendering control elements (such as control background, buttons, hint boxes, images, etc.) on a graphic surface. Painter class members include class methods that you can call when custom painting controls using OnCustomDraw~ events. To learn more about these events, refer to the corresponding topics. Certain calculations of control or element visual settings (such as the element position within a control) may take a while during painting. To ensure smooth painting, all calculations are performed on demand and results are stored within the ViewInfo objects, which are then used by painters.
Page 934 of 938
ViewInfo ViewInfo contains the essential painting information about a control’s UI element used by control and element painters. If any visual element setting is changed, ViewInfo is immediately recalculated. The information stored in a ViewInfo object includes:
l The bounding rectangle, painter class, size, and position parameters; l Colors and font settings; l Various element-specific parameters, including HitTest.
Not only painters use ViewInfo objects. OnCustomDraw~ event handlers can use it as well. The OnCustomDraw~ event (if available for a specific element) occurs when the element is about to be painted. This allows you to completely redraw this element. As a rule, ViewInfo of the painted control or element is passed as an event parameter. So you can use it for easy access and modification of various visual settings. To learn more about OnCustomDraw~ events, refer to the corresponding topics.
Page 935 of 938
Legend Protected Published ReadOnly
Page 936 of 938
Scrollbar A scrollbar is a control allowing end-users to select values within a specific range. A scrollbar provides the following visual element to allow value selection (also called scrolling).
A scrollbar value is always synchronized with the thumb’s position. End-users can move the thumb to select a specific scrollbar value or gradually adjust it. This can be accomplished either by clicking the scroll buttons or the shaft, or by dragging the thumb to the desired position. Clicking scroll buttons moves the thumb a small distance (smooth scrolling), while clicking the shaft moves the thumb a large distance (accelerated scrolling). You can adjust distance values as required, or even make them match to enable a consistent scrolling behavior.
Page 937 of 938
WYSIWYG "What You See Is What You Get" – Applicable to editor classes in that the author is aware at all times of the final appearance of the object being built.
Page 938 of 938