Scrolling a form even when scrolling bars are turned off: feature or bug?

I used to think that if no scroll bars were selected, the user could not scroll a form, but that is not always true. If there is a text editor object on the form, one can click and hold in the text editor object, then drag the pointer to the right beyond the edge of the form and the form will scroll. You can scroll it back to the starting position too in the same manner. For an knowledgeable PanX user, this might be useful, but in a work environment with non-expert users, this may cause confusion.

If the text editor object has a scroll bar, this doesn’t happen.

I think what is happening here is that the text editor code is trying to scroll, the text doesn’t scroll, so it scrolls the first thing it CAN scroll – the form.

I guess this is a minor bug, but it is pretty obscure. In fact at first I thought I could not duplicate the problem. For anyone else wanting to try this, you have to click the mouse on a text editor object, then while continuing to hold the mouse down, drag the mouse off the edge of the window.

However, I think to change this behavior would take a major revamp of the entire structure of forms.

Also, making this change would break the formxy statement in a form with no scroll bars. I’m sure someone is relying on that to shift around to different areas of a form.

So – I’m going to leave this alone.

I have a scrolling problem as well, which may or may not be connected. One of my forms is tall and skinny (9.25 inches tall, 4.6 inches wide, by Graphics Mode rulers). I, and some of my users, use a Magic Mouse, which is a cool tool in many ways but it can over-respond to certain touches which causes it to induce a scrolling action at unpredictable times. So for this form it is (or would be) very useful to turn scrolling off, particularly horizontal. That’s easy to do, but I can’t make it work. I make sure the form is not scrolled horizontally in its window, then go to Graphics Mode (which requires the window to get temporarily wider) to turn scrolling off, then go back to Data Mode and close down the window size until it just frames the desired part of the form. As I close it down to about the 7.5 inch wide point the form starts scrolling to the left, putting the left side of the form off the window. And of course I can’t correct it because I have turned scrolling off. If scrolling is on, I can put the form right where I want it in the window, but I have the rogue scrolling vulnerability to contend with.

I would bet this is reproducible by anyone, but the question is - can it be corrected? Maybe there is a limitation built in to the Apple API. This form is very useful in this shape and I’d like to make it work.

You can scroll the form back with a procedure to move it to the 0,0 coordinates. Use formxy -1000,-1000 which will move the form back to 0,0 as long as it has not scrolled more than 1000 pixels away. Any value over what is needed to move to the 0 position is apparently ignored so you can use any value that will assure the move back to 0,0. You could even have this as a hot key to force the scroll back.

Interesting. Yes, that worked, but I found that if I mess with the window size at all it makes the form jump to the left again (which is easily corrected with my new button). Mostly solved, but I’m still interested in whether an actual fix is possible.

You can set the maximum and minimum size of the form window to the same values in the properties pane for the form. Once it is set and the form is in data mode you can force scroll it back to 0,0 and it then can not be resized in data mode.

Slick! …

I can see that the documentation is a bit fuzzy here, but the coordinates in this statement are absolute, not relative. So what you want is

formxy 0,0

It doesn’t matter what the current scrolling is, this will set it back to top left.