KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Scroll Bars and Scrollable Areas
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: February 2, 2001

When clicking the scroll bar in a scrollable area (grouped or not) it executes the object method for that area (provided the object method is set to execute with the On clicked form event).

The following object method works around that behaviour (it should be assigned to the right-most scrollable area when use with grouped areas).

During the On clicked event a test is performed to know whether it was made on the list or the scrollable area. You can then branch into the appropriate actions.

To copy the code described above, select the text below:

Case of
: (Form event=On Clicked )
GET OBJECT RECT(*;ListName;$Left;$Top;$Right;$Bottom)
GET MOUSE($MouseX;$MouseY;$MouseButton)
If ($mouseX<($Right-10))
` the scroll bar was clicked, do nothing
Else
`Do whatever you want to be performed here
End if
End case