Board index » delphi » * How do I scroll past the max and min of a TScrollingWinControl

* How do I scroll past the max and min of a TScrollingWinControl

How do I scroll past the max and min of a TScrollingWinControl.  What I
would like to happen is to have the window to continue to scroll in the
direction that I'm clicking even though the thumb position has reached the
limit.

Thanks in advance,
Daniel Spiess
dspi...@achieve.com

 

Re:* How do I scroll past the max and min of a TScrollingWinControl


Daniel,

This doesn't make sense - you want to allow scrolling beyond what
you've said is the maximum area you can scroll?

Ken
--
Ken White

Clipper Functions for Delphi
http://members.aol.com/clipfunc

Quote
Daniel Spiess wrote:

> How do I scroll past the max and min of a TScrollingWinControl.  What I
> would like to happen is to have the window to continue to scroll in the
> direction that I'm clicking even though the thumb position has reached the
> limit.

> Thanks in advance,
> Daniel Spiess
> dspi...@achieve.com

Re:* How do I scroll past the max and min of a TScrollingWinControl


Quote
Daniel Spiess wrote in message <6tk8ff$ft...@news1.rmi.net>...
>How do I scroll past the max and min of a TScrollingWinControl.  What I
>would like to happen is to have the window to continue to scroll in the
>direction that I'm clicking even though the thumb position has reached the
>limit.

You can send WM_SCROLL messages to the window and it will continue
to scroll without boundaries. This is easily done by dropping a button on
a form and writing the SendMessage code there, but it's a tougher job
to implement your own behaviour for the actual scrolling buttons. Delve
into the source for TScrollingWinControl.

HTH
--
Jeremy Collins
Kansai Business Systems

Re:* How do I scroll past the max and min of a TScrollingWinControl


Yes.  Thats exactly what I want to do.  Sounds weird but it really isnt.
Ever run MS Project?  If you scroll to the end, you can continue to scroll
even though youve reached the maximum.  This way you can scroll to any date
in the future or past.  It doesnt make sense to have a range if you are
scrolling on an infinite line.

Thanks
Daniel Spiess

Quote
Ken White <kwh...@westelcom.com> wrote in message

<35FDEBD7.D8826...@westelcom.com>...
Quote
> Daniel,

> This doesn't make sense - you want to allow scrolling beyond what
> you've said is the maximum area you can scroll?

> Ken
> --
> Ken White

> Clipper Functions for Delphi
> http://members.aol.com/clipfunc

> Daniel Spiess wrote:

> > How do I scroll past the max and min of a TScrollingWinControl.  What I
> > would like to happen is to have the window to continue to scroll in the
> > direction that I'm clicking even though the thumb position has reached
the
> > limit.

> > Thanks in advance,
> > Daniel Spiess
> > dspi...@achieve.com

Re:* How do I scroll past the max and min of a TScrollingWinControl


In the scroll event, check for position is min or max then adjust min
or max to fit the new required min or max.

I remember the beta of Windows 95 would allow you to scroll a folder
window past the edge to make more whitespace to drop files in if you
clicked the actual arrow at the end of the scroll bar.

For some reason they quit doing that...

On Tue, 15 Sep 1998 11:53:13 -0600, "Daniel Spiess"

Quote
<dspi...@achieve.com> wrote:
>Yes.  Thats exactly what I want to do.  Sounds weird but it really isnt.
>Ever run MS Project?  If you scroll to the end, you can continue to scroll
>even though youve reached the maximum.  This way you can scroll to any date
>in the future or past.  It doesnt make sense to have a range if you are
>scrolling on an infinite line.

>Thanks
>Daniel Spiess

>Ken White <kwh...@westelcom.com> wrote in message
><35FDEBD7.D8826...@westelcom.com>...
>> Daniel,

>> This doesn't make sense - you want to allow scrolling beyond what
>> you've said is the maximum area you can scroll?

>> Ken
>> --
>> Ken White

>> Clipper Functions for Delphi
>> http://members.aol.com/clipfunc

>> Daniel Spiess wrote:

>> > How do I scroll past the max and min of a TScrollingWinControl.  What I
>> > would like to happen is to have the window to continue to scroll in the
>> > direction that I'm clicking even though the thumb position has reached
>the
>> > limit.

>> > Thanks in advance,
>> > Daniel Spiess
>> > dspi...@achieve.com

Re:* How do I scroll past the max and min of a TScrollingWinControl


Well... after several hours of near postal experiences here's what I put in
the WMScroll event.

   with aMsg do begin
      case ScrollCode of
          SB_LINELEFT : aScrollVal := HorzScrollBar.Increment;
          SB_LINERIGHT : aScrollVal := -HorzScrollBar.Increment;
          SB_PAGELEFT : aScrollVal := HorzScrollBar.Increment;
          SB_PAGERIGHT: aScrollVal := -HorzScrollBar.Increment;
      end;
      if ScrollCode <> SB_ENDSCROLL then begin
         ScrollBy(aScrollVal, 0);
      end;
   end;

This seems to work great, but I still have to update the scroll bar.  Right
now it doesn't change.  Thanks for everyone's input.

Daniel Spiess
dspi...@achieve.com

Other Threads