Reference TColorSlideEdit
Declared in Codebot.Controls.Colors.pas on line 317
TColorSlideEdit is a slide edit for one component of a color, with a color bar along its bottom which can be dragged to change the value. Position ranges from 0 to 255 for every kind. Use the Update methods to keep several color slide edits and pickers in sync without invoking OnValueChange.
TColorSlideEdit = class(TCustomSlideEdit)
protected
function GetButtonRect: TRectI; override;
function GetEditRect: TRectI; override;
function ExtraHeight: Integer; override;
procedure DoValueChange; override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure Draw; override;
public
{ Create a new color slide edit }
constructor Create(AOwner: TComponent); override;
{ Set the alpha shown by an alpha slide edit }
procedure UpdateAlpha(Alpha: Byte);
{ Set the color used to draw the bar, and the position of a red, green, or
blue slide edit }
procedure UpdateColor(Color: TColorB);
{ Set the hue used to draw the bar, and the position of a hue slide edit }
procedure UpdateHue(Hue: Float);
{ Set the position of a saturation or lightness slide edit }
procedure UpdateHSL(const HSL: THSL);
{ The color used to draw the bar }
property RefColor: TColorB read FColor;
published
{ The color component edited }
property Kind: TColorSlideKind read FKind write SetKind default cskRed;
property AutoHeight;
property Position;
property OnValueChange;
property Align;
property Anchors;
property BorderSpacing;
property Constraints;
property Enabled;
property Font;
property ParentFont;
property ParentShowHint;
property ShowHint;
property TabOrder;
property Visible;
property OnEnter;
property OnExit;
end;See also
Float in Codebot.System.pas
TColorB in Codebot.Graphics.Types.pas
TCustomSlideEdit in Codebot.Controls.Edits.pas
THSL in Codebot.Graphics.Types.pas
TRectI in Codebot.Graphics.Types.pas