mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 04:07:57 +02:00
removed ShowScale
git-svn-id: trunk@9113 -
This commit is contained in:
parent
0a08475ff7
commit
7e9fc77a93
@ -1302,7 +1302,6 @@ Type
|
||||
property PopupMenu;
|
||||
property ScalePos;
|
||||
property ShowHint;
|
||||
property ShowScale;
|
||||
property TabOrder;
|
||||
property TabStop;
|
||||
property TickMarks;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 ------------------------------}
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user