summaryrefslogtreecommitdiff
path: root/gui/fpguiscrollbar.inc
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@users.sourceforge.net>2007-04-25 15:08:52 +0000
committerGraeme Geldenhuys <graemeg@users.sourceforge.net>2007-04-25 15:08:52 +0000
commit55825e0ebbe83c960478600f37858fdb8df2cf82 (patch)
tree9e3646af2da5fb67dcbe5e53afd557ed4459f9a1 /gui/fpguiscrollbar.inc
parent314decc7aecb7efb2e12d41814a2a09408939f76 (diff)
downloadfpGUI-55825e0ebbe83c960478600f37858fdb8df2cf82.tar.xz
* After the last patch of the TEdit it broke the PasswordChar feature which is now fixed again.
* Removed the anoying feature when you drag a scrollbar and move out of bounds, the scrollbar jumps back to the original position. Maybe we can keep that behaviour, but enabled via a property. * Busy implementing a SaveForm function, but still experimental and mostly for debugging only.
Diffstat (limited to 'gui/fpguiscrollbar.inc')
-rw-r--r--gui/fpguiscrollbar.inc37
1 files changed, 20 insertions, 17 deletions
diff --git a/gui/fpguiscrollbar.inc b/gui/fpguiscrollbar.inc
index 3a5f1e66..08e1ecc8 100644
--- a/gui/fpguiscrollbar.inc
+++ b/gui/fpguiscrollbar.inc
@@ -48,7 +48,7 @@
procedure SetPageSize(APageSize: Integer);
procedure SetPosition(APosition: Integer);
// Helpers
- function GeTFButtonSize: Integer;
+ function GetButtonSize: Integer;
function ClipPosition(APosition: Integer): Integer;
procedure UpdateBar;
protected
@@ -192,7 +192,7 @@ begin
ButtonPos := (Position - Min) *
(Size - ButtonSize) div (Max - Min - PageSize + 1);
end;
- ButtonSize := GeTFButtonSize;
+ ButtonSize := GetButtonSize;
end;
Redraw;
end;
@@ -278,7 +278,7 @@ begin
Result := inherited ProcessEvent(Event); // For mouse grabbing support
if Event.Button <> mbLeft then
- exit;
+ Exit; //==>
if TFCustomScrollBar(Owner).Orientation = Horizontal then
Pos := Event.Position.x
@@ -312,7 +312,7 @@ begin
Result := inherited ProcessEvent(Event); // For mouse grabbing support
if Event.Button <> mbLeft then
- exit;
+ Exit; //==>
if IsDraggingButton then
begin
@@ -348,8 +348,10 @@ var
begin
if IsDraggingButton then
begin
- if wsMouseInside in WidgetState then
- begin
+// We can maybe make this a scrollbar option. Reset scrollbar thumb when
+// mouse moves out of bounds of scrollbar. For now it is just anoying.
+// if wsMouseInside in WidgetState then
+// begin
if TFCustomScrollBar(Owner).Orientation = Horizontal then
begin
Pos := Event.Position.x;
@@ -359,15 +361,15 @@ begin
Pos := Event.Position.y;
Size := Height;
end;
- end
- else
- begin
- Pos := DragStartMousePos;
- if TFCustomScrollBar(Owner).Orientation = Horizontal then
- Size := Width
- else
- Size := Height;
- end; { if/else }
+// end
+// else
+// begin
+// Pos := DragStartMousePos;
+// if TFCustomScrollBar(Owner).Orientation = Horizontal then
+// Size := Width
+// else
+// Size := Height;
+// end; { if/else }
ButtonPos := ClipMinMax(DragStarTFButtonPos + Pos - DragStartMousePos,
0, Size - ButtonSize);
@@ -382,7 +384,8 @@ begin
Redraw;
Result := True
- end else
+ end
+ else
Result := False;
end;
@@ -669,7 +672,7 @@ begin
end;
-function TFCustomScrollBar.GeTFButtonSize: Integer;
+function TFCustomScrollBar.GetButtonSize: Integer;
var
Size: Integer;
begin