Page 1 of 1

Scrollbargadget EventType? [Resolved]

Posted: Mon Dec 26, 2016 5:08 am
by collectordave
Just hit a small problem.

Scrolling a grid on a canvas gadget that has variable column widths and variable row heights which means that there are a variable number of columns and or rows on any "Page" displayed.

This means that having an arbitrary number for the page setting on a scroll bar leads to some scrolling confusion in this case.

To get over this would it be possible to have some scrollbar EventTypes?

I think the whole list would be

Small Positive Change
Large Positive Change
Small Negative Change
Large Negative Change

These would allow the programmer to ignore the value of the gadget and scroll meaningfully dependant upon the application. Of course the normal change and value still need to be kept as in most situations there a more than adequate.

Regards

cd

Re: Scrollbargadget EventType?

Posted: Mon Dec 26, 2016 2:15 pm
by Mistrel
My opinion on this after working with native scrollbars on Windows is that this is most likely difficult to achieve in a cross-platform way without some kind of compromising interface. Don't forget that scroll events can also be triggered by a mousewheel, arrow keys, numkeys, page keys, home/end.. there's a lot of behavior to consider.

There are some interesting nuances (at least on Windows) which don't work as you might expect such as trying to query information about a scrollable area when the scrollbars are disabled.

I agree that this would be a nice addition but also expect it to be a challenge to implement.

Re: Scrollbargadget EventType?

Posted: Tue Dec 27, 2016 4:22 am
by collectordave
Hi

The scrollable area I am using is a canvas gadget not the scrollarea gadget. It is my programme that dictates what is shown on that canvas. So mousewheels produce mouse wheel events and keys produce their own key events. It is my choice whether to use these events in my programme as the only conection between my canvas gadget and these events is through my programme.

So that said the scrollbar gadget is restrictive in use. When using the page value the scrollbar value does not reach maximum and the page length needs to be varied whenever scrolling up or down. Indeed a down scroll may need a different page length to an up scroll. I know the current behaviour is what is required in the majority of cases and actualy helps in most situations however as outlined above where it is not known in advance what the page length is, the programme needs control and can only take control when these events are exposed to be used.

Regards
cd

Re: Scrollbargadget EventType?

Posted: Thu Jan 05, 2017 4:14 pm
by collectordave
Ok resolved.

Rolled my own.

Will post code in a few minutes.

Cheers

cd