LCL : Changed TColorBox.Selection to TColorBox.Selected (bug #9498)

git-svn-id: trunk@11863 -
This commit is contained in:
vincents 2007-08-25 21:50:38 +00:00
parent fa05992ce0
commit 8609307af8
2 changed files with 22 additions and 22 deletions

View File

@ -311,7 +311,7 @@ begin
begin begin
P := PGlyphInfo(TreeView.Selected.Data); P := PGlyphInfo(TreeView.Selected.Data);
P^.Adjustment := TGlyphAdjustment(RadioGroup.ItemIndex); P^.Adjustment := TGlyphAdjustment(RadioGroup.ItemIndex);
P^.TransparentColor := ColorBoxTransparent.Selection; P^.TransparentColor := ColorBoxTransparent.Selected;
T := CreateGlyph(P^.Bitmap, ImageList.Width, ImageList.Height, P^.Adjustment, T := CreateGlyph(P^.Bitmap, ImageList.Width, ImageList.Height, P^.Adjustment,
P^.TransparentColor); P^.TransparentColor);
@ -378,7 +378,7 @@ begin
ColorBoxTransparent.Enabled := True; ColorBoxTransparent.Enabled := True;
ColorBoxTransparent.OnChange := nil; ColorBoxTransparent.OnChange := nil;
ColorBoxTransparent.Selection := P^.TransparentColor; ColorBoxTransparent.Selected := P^.TransparentColor;
ColorBoxTransparent.OnChange := @ColorBoxTransparentClick; ColorBoxTransparent.OnChange := @ColorBoxTransparentClick;
end end
else else
@ -390,7 +390,7 @@ begin
ColorBoxTransparent.Enabled := False; ColorBoxTransparent.Enabled := False;
ColorBoxTransparent.OnChange := nil; ColorBoxTransparent.OnChange := nil;
ColorBoxTransparent.Selection := clFuchsia; ColorBoxTransparent.Selected := clFuchsia;
ColorBoxTransparent.OnChange := @ColorBoxTransparentClick; ColorBoxTransparent.OnChange := @ColorBoxTransparentClick;
end; end;
@ -412,7 +412,7 @@ begin
ColorBoxTransparent.Enabled := False; ColorBoxTransparent.Enabled := False;
ColorBoxTransparent.OnChange := nil; ColorBoxTransparent.OnChange := nil;
ColorBoxTransparent.Selection := clFuchsia; ColorBoxTransparent.Selected := clFuchsia;
ColorBoxTransparent.OnChange := @ColorBoxTransparentClick; ColorBoxTransparent.OnChange := @ColorBoxTransparentClick;
Preview.HorzScrollBar.Range := ImageList.Width; Preview.HorzScrollBar.Range := ImageList.Width;

View File

@ -38,8 +38,8 @@ type
private private
FPalette: TColorPalette; FPalette: TColorPalette;
function GetColor(Index : Integer): TColor; function GetColor(Index : Integer): TColor;
function GetSelection: TColor; function GetSelected: TColor;
procedure SetSelection(Value: TColor); procedure SetSelected(Value: TColor);
procedure SetPalette(Value: TColorPalette); procedure SetPalette(Value: TColorPalette);
protected protected
procedure SetStyle(Value: TComboBoxStyle); override; procedure SetStyle(Value: TComboBoxStyle); override;
@ -75,7 +75,7 @@ type
property ParentShowHint; property ParentShowHint;
property PopupMenu; property PopupMenu;
property ReadOnly; property ReadOnly;
property Selection: TColor read GetSelection write SetSelection; property Selected: TColor read GetSelected write SetSelected;
property ShowHint; property ShowHint;
property Sorted; property Sorted;
property TabOrder; property TabOrder;
@ -112,8 +112,8 @@ type
private private
FPalette: TColorPalette; FPalette: TColorPalette;
function GetColor(Index : Integer): TColor; function GetColor(Index : Integer): TColor;
function GetSelection: TColor; function GetSelected: TColor;
procedure SetSelection(Value: TColor); procedure SetSelected(Value: TColor);
procedure SetPalette(Value: TColorPalette); procedure SetPalette(Value: TColorPalette);
protected protected
procedure SetStyle(Value: TListBoxStyle); override; procedure SetStyle(Value: TListBoxStyle); override;
@ -121,8 +121,8 @@ type
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
procedure SetColorList; procedure SetColorList;
property Selection: TColor read GetSelection write SetSelection;
property Colors[Index : Integer] : TColor Read GetColor; property Colors[Index : Integer] : TColor Read GetColor;
property Selected: TColor read GetSelected write SetSelected;
published published
property Align; property Align;
property Anchors; property Anchors;
@ -214,14 +214,14 @@ begin
Style := csOwnerDrawFixed; Style := csOwnerDrawFixed;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TColorBox.GetSelection Method: TColorBox.GetSelected
Params: None Params: None
Returns: TColor Returns: TColor
Use GetSelection to convert the item selected into a system color. Use GetSelected to convert the item selected into a system color.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TColorBox.GetSelection: TColor; function TColorBox.GetSelected: TColor;
begin begin
Result := 0; Result := 0;
if ItemIndex >= 0 then if ItemIndex >= 0 then
@ -245,15 +245,15 @@ begin
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TColorBox.SetSelection Method: TColorBox.SetSelected
Params: Value Params: Value
Returns: Nothing Returns: Nothing
Use SetSelection to set the item in the ColorBox when appointed a color Use SetSelected to set the item in the ColorBox when appointed a color
from code. from code.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TColorBox.SetSelection(Value: TColor); procedure TColorBox.SetSelected(Value: TColor);
var var
c: integer; c: integer;
i: Longint; i: Longint;
@ -400,14 +400,14 @@ begin
Style := lbOwnerDrawFixed; Style := lbOwnerDrawFixed;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TColorListBox.GetSelection Method: TColorListBox.GetSelected
Params: None Params: None
Returns: TColor Returns: TColor
Use GetSelection to convert the item selected into a system color. Use GetSelected to convert the item selected into a system color.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TColorListBox.GetSelection: TColor; function TColorListBox.GetSelected: TColor;
begin begin
Result := 0; Result := 0;
if ItemIndex >= 0 then if ItemIndex >= 0 then
@ -430,15 +430,15 @@ begin
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TColorListBox.SetSelection Method: TColorListBox.SetSelected
Params: Value Params: Value
Returns: Nothing Returns: Nothing
Use SetSelection to set the item in the ColorListBox when appointed a color Use SetSelected to set the item in the ColorListBox when appointed a color
from code. from code.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TColorListBox.SetSelection(Value: TColor); procedure TColorListBox.SetSelected(Value: TColor);
var var
c: integer; c: integer;
i: Longint; i: Longint;