removed ShowScale

git-svn-id: trunk@9113 -
This commit is contained in:
vincents 2006-04-10 11:18:13 +00:00
parent 0a08475ff7
commit 7e9fc77a93
7 changed files with 14 additions and 33 deletions

View File

@ -1302,7 +1302,6 @@ Type
property PopupMenu;
property ScalePos;
property ShowHint;
property ShowScale;
property TabOrder;
property TabStop;
property TickMarks;

View File

@ -2543,7 +2543,6 @@ TrackBar1 := TTrackBar.Create(Self);
Width := 15;
Name := 'TrackBar1';
PopupMenu := PopupMenu1;
ShowScale := True;
ScalePos := trTop;
TickMarks := tmBoth;
TickStyle := tsAuto;
@ -2567,7 +2566,6 @@ TrackBar2 := TTrackBar.Create(Self);
Width := 220;
Name := 'TrackBar2';
PopupMenu := PopupMenu1;
ShowScale := True;
ScalePos := trTop;
TickMarks := tmBoth;
TickStyle := tsAuto;

View File

@ -123,8 +123,10 @@ End;
procedure TForm1.Button5Click(Sender : TObject);
Begin
if assigned (Track1) then begin
writeln ('Toggling ShowScalePos');
Track1.ShowScale := not Track1.ShowScale;
writeln ('Toggling showing tickmarks');
if Track1.TickStyle = tsNone
then Track1.TickStyle = tsAuto
else Track1.TickStyle = tsNone;
end;
End;

View File

@ -1474,7 +1474,6 @@ type
FMax: Integer;
FFrequency: Integer;
FPosition: Integer;
FShowScale : boolean;
FScalePos : TTrackBarScalePos;
FScaleDigits : integer;
FOnChange: TNotifyEvent;
@ -1487,7 +1486,6 @@ type
procedure SetParams(APosition, AMin, AMax: Integer);
procedure SetPosition(Value: Integer);
procedure SetScalePos(Value: TTrackBarScalePos);
procedure SetShowScale(Value: boolean);
procedure SetTickMarks(Value: TTickMark);
procedure SetTickStyle(Value: TTickStyle);
procedure UpdateSelection;
@ -1509,7 +1507,6 @@ type
property PageSize: Integer read FPageSize write SetPageSize default 2;
property Position: Integer read FPosition write SetPosition;
property ScalePos: TTrackBarScalePos read FScalePos write SetScalePos;
property ShowScale: boolean read FShowScale write SetShowScale;
property TabStop default True;
property TickMarks: TTickMark read FTickMarks write SetTickMarks default tmBottomRight;
property TickStyle: TTickStyle read FTickStyle write SetTickStyle default tsAuto;
@ -1559,7 +1556,6 @@ type
property Position;
property ScalePos;
property ShowHint;
property ShowScale;
property TabOrder;
property TabStop;
property TickMarks;

View File

@ -35,9 +35,8 @@
- what about these private procs
procedure CNHScroll(var Message: TWMHScroll); message CN_HSCROLL;
procedure CNVScroll(var Message: TWMVScroll); message CN_VSCROLL;
- there are 2 new properties which I've implemented because they're
nice addons for the GTK interface
* ShowScale
- there is a new property which I've implemented because it is a
nice addon for the GTK interface
* ScalePos (left, top, right, bottom)
TODO:
@ -70,7 +69,6 @@ begin
FPosition := 0;
FPageSize := 2;
FOrientation := trHorizontal;
FShowScale := false;
FScalePos := trTop;
FScaleDigits := 0;
FTickMarks:=tmBottomRight;
@ -213,7 +211,11 @@ end;
------------------------------------------------------------------------------}
procedure TCustomTrackBar.SetTickStyle(Value: TTickStyle);
begin
FTickStyle := Value;
if FTickStyle <> Value then
begin
FTickStyle := Value;
ApplyChanges;
end;
end;
{------------------------------------------------------------------------------
@ -299,21 +301,6 @@ begin
if Assigned (FOnChange) then FOnChange(Self);
end;
{------------------------------------------------------------------------------
Method: TCustomTrackBar.SetShowScale
Params: value : true = show scaling text
Returns: Nothing
------------------------------------------------------------------------------}
procedure TCustomTrackBar.SetShowScale(Value: boolean);
begin
if FShowScale <> Value then
begin
FShowScale := Value;
ApplyChanges;
end;
end;
{------------------------------------------------------------------------------
Method: TCustomTrackBar.SetScalePos
Params: value : position of the scaling text
@ -329,4 +316,3 @@ begin
end;
end;
{ -------------------- unimplemented stuff below ------------------------------}

View File

@ -352,9 +352,9 @@ begin
otherwise it's set always to true }
gtk_scale_set_draw_value (GTK_SCALE (Pointer(wHandle)), false);
if ShowScale then
if (TickStyle<>tsNone) then
begin
gtk_scale_set_draw_value (GTK_SCALE (Pointer(wHandle)), ShowScale);
gtk_scale_set_draw_value (GTK_SCALE (Pointer(wHandle)), true);
case ScalePos of
trLeft : gtk_scale_set_value_pos (GTK_SCALE (Pointer(wHandle)), GTK_POS_LEFT);
trRight : gtk_scale_set_value_pos (GTK_SCALE (Pointer(wHandle)), GTK_POS_RIGHT);

View File

@ -541,7 +541,7 @@ begin
trHorizontal:
SetWindowLong(wHandle, GWL_STYLE, GetWindowLong(wHandle, GWL_STYLE) or TBS_HORZ);
end;
if ShowScale then
if TickStyle<>tsNone then
begin
case ScalePos of
trLeft: