let widget read stored value when creating handle; patch by vincent (issue #1458)

git-svn-id: trunk@8196 -
This commit is contained in:
micha 2005-11-19 15:39:47 +00:00
parent ba14a3e41f
commit 192b287775
2 changed files with 9 additions and 1 deletions

View File

@ -182,7 +182,8 @@ end;
{-----------------------------------------------------------------------------}
Function TCustomFloatSpinEdit.GetValue: Single;
begin
if HandleAllocated and FValueChanged then
if HandleAllocated and FValueChanged
and not (wcfCreatingHandle in FWinControlFlags) then
begin
FValue := TWSCustomFloatSpinEditClass(WidgetSetClass).GetValue(Self);
FValueChanged := false;

View File

@ -58,6 +58,13 @@ type
class procedure SetSelStart(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewStart: integer); virtual;
class procedure SetSelLength(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewLength: integer); virtual;
(* TODO: seperation into properties instead of bulk update
class procedure SetIncrement(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewIncrement: single); virtual;
class procedure SetMinValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewValue: single); virtual;
class procedure SetMaxValue(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewValue: single); virtual;
class procedure SetValueEmpty(const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewEmpty: boolean); virtual;
*)
class procedure UpdateControl(const ACustomFloatSpinEdit: TCustomFloatSpinEdit); virtual;
end;