ShowGetGradientDlg method (LEADDlgEffect Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

int ShowGetGradientDlg(TWinControl* AOwnerCtrl);

Delphi Syntax

Function ShowGetGradientDlg (AOwnerCtrl: TWinControl ): L_INT;

Overview

Refer to Using Imaging Common Dialogs.

Remarks

Displays the GetGradient dialog box, and gets the options for the Gradient properties.

The layout and action of the dialog depends on the flags set in the DlgFlags property. Possible options are:

Value

Meaning

DLG_GRADIENT_SHOW_CONTEXTHELP

[$00000001] Dialog should contain a context sensitive help icon.

DLG_GRADIENT_SHOW_PREVIEW

[$00000002] Show a preview of the image in the dialog. The Common Dialog LEADImage property must be assigned a Main Control containing a valid bitmap before calling this method.

DLG_GRADIENT_AUTOPREVIEW

[$00000004] Auto preview when options change

DLG_GRADIENT_STARTCOLOR

[$00000008] Start color is an option

DLG_GRADIENT_ENDCOLOR

[$00000010] End color is an option

DLG_GRADIENT_STEPS

[$00000020] gradient steps is an option

DLG_GRADIENT_NO_TREEVIEW

[$00000040] DO NOT use TreeView

DLG_GRADIENT_CLASS_LINEAR

[$00000080] Linear gradients are an option

DLG_GRADIENT_CLASS_ANGULAR

[$00000100] Angular gradients are an option

DLG_GRADIENT_CLASS_RECTANGULAR

[$00000200] Rectangular gradients are an option

DLG_GRADIENT_CLASS_ELLIPTICAL

[$00000400] Elliptical gradients are an option

DLG_GRADIENT_CLASS_CONICAL

[$00000800] Conical gradients are an option

These values may be combined by ORing them.

If you include DLG_GRAD_SHOWPREVIEW in the DlgFlags property, the Common Dialog LEADImage property must be assigned a Main Control containing a valid bitmap before calling this method.

The following properties are associated specifically with this method:

GradientStyle property

GradientSteps property

StartColor property

EndColor property

To include a Help button in the dialog, set the ShowHelpButton property to TRUE.

The GetGradient dialog can be seen below:

image\GetGradient.gif

See Also

Elements:

GradientStyle property, GradientStartColor property, StartColor property, EndColor property, GradientEndColor property, GradientSteps property, PatternStyle property, PatternBackColor property, PatternForeColor property, DlgFlags property, ShowHelpButton property.

Topics:

Imaging Common Dialogs: Properties, Methods, and Events