diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-15 13:58:18 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-02-15 13:58:18 +0000 |
commit | 831cb67e19cfe06c390cc632d1d6e8446acfa57c (patch) | |
tree | 6aca91bff4114393585fac87911e08866d6a1abc /src/gui/gui_radiobutton.pas | |
parent | 0bfd76ac0c585efcdbf4ee8574c8c844e7142108 (diff) | |
download | fpGUI-831cb67e19cfe06c390cc632d1d6e8446acfa57c.tar.xz |
* Applied Jean-Marc's TextColor and BackgroundColor patch.
* Made many more modifications based on Jean-Marc's patch and fixed a few things missed.
Diffstat (limited to 'src/gui/gui_radiobutton.pas')
-rw-r--r-- | src/gui/gui_radiobutton.pas | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/gui/gui_radiobutton.pas b/src/gui/gui_radiobutton.pas index 2b847e14..8596530c 100644 --- a/src/gui/gui_radiobutton.pas +++ b/src/gui/gui_radiobutton.pas @@ -34,9 +34,7 @@ type TfpgRadioButton = class(TfpgWidget) private - FBackgroundColor: TfpgColor; FChecked: boolean; - FTextColor: TfpgColor; FFont: TfpgFont; FGroupIndex: integer; FOnChange: TNotifyEvent; @@ -44,9 +42,7 @@ type FBoxSize: integer; FIsPressed: boolean; function GetFontDesc: string; - procedure SetBackgroundColor(const AValue: TfpgColor); procedure SetChecked(const AValue: boolean); - procedure SetTextColor(const AValue: TfpgColor); procedure SetFontDesc(const AValue: string); procedure SetText(const AValue: string); protected @@ -59,12 +55,12 @@ type destructor Destroy; override; property Font: TfpgFont read FFont; published - property BackgroundColor: TfpgColor read FBackgroundColor write SetBackgroundColor default clWindowBackground; + property BackgroundColor; property Checked: boolean read FChecked write SetChecked default False; property FontDesc: string read GetFontDesc write SetFontDesc; property GroupIndex: integer read FGroupIndex write FGroupIndex; property Text: string read FText write SetText; - property TextColor: TfpgColor read FTextColor write SetTextColor default clText1; + property TextColor; property OnChange: TNotifyEvent read FOnChange write FOnChange; end; @@ -89,14 +85,6 @@ begin Result := FFont.FontDesc; end; -procedure TfpgRadioButton.SetBackgroundColor(const AValue: TfpgColor); -begin - if FBackgroundColor = AValue then - Exit; //==> - FBackgroundColor := AValue; - RePaint; -end; - procedure TfpgRadioButton.SetChecked(const AValue: boolean); var i: integer; @@ -123,15 +111,6 @@ begin RePaint; end; -procedure TfpgRadioButton.SetTextColor(const AValue: TfpgColor); -begin - if FTextColor <> AValue then - begin - FTextColor := AValue; - Repaint; - end; -end; - procedure TfpgRadioButton.SetFontDesc(const AValue: string); begin FFont.Free; @@ -246,8 +225,8 @@ begin FFont := fpgGetFont('#Label1'); FHeight := FFont.Height + 4; FWidth := 120; - FTextColor := clText1; - FBackgroundColor := clWindowBackground; + FTextColor := Parent.TextColor; + FBackgroundColor := Parent.BackgroundColor; FFocusable := True; FBoxSize := 12; FChecked := False; |