Re: gtk-devel-list digest, Vol 1 #1395 - 1 msg



Bill Haneman <bill haneman sun com> wrote:

I rigged something at the child widget level, which fires off on
focus_in, checks it's position vis-a-vis what the HAdjustment and/or
the the VAdjustment widgets are set to, and moves the scrolled window
around.

...

No, I'm looking for a Scroll Policy that makes the adjustments happen
automagically. So, really, you're looking at calling
gtk_container_real_set_focus_child() being called as a part of the
child's "focus-in" default callback

Have you tried using those functions? Have you looked at the example
in testgtk? I can't see how the behavior differs from what you are
describing.


I would love to see this become the default behavior, it seems like
what you would want in almost all cases, and would greatly
improve keynav for forms in scrollpanes.

Despite my confusion over the naming of those functions, they do fit the bill. We ought to talk with the gtkhtml guys so they know they didn't need to write their own scroll-to-widget function.

I'm not sure when you'd want the scrollbars not to follow the focus, but I see differentiation whether it ensures that the widget plus it's entire width/height is visible. Also, maybe, a notion of a "timed" scroll: if you <tab> the focus to the widget 'a', but then move the focus to widget 'b' within a threshold of 'x' time (obviously a low value), then should it move the view? Hmm, how would Gtk know that it's running off of a redirected X server, going over PPP channel at 300 baud? (Yes, it's the same autodial acoustic modem from "Hackers"!) Where it KNOWS every redraw is painful?

Rolling back to my original perception of where the functionality should be, I thought it an attribute of the scrolled window, e.g., the scrollbar "policy" or something along those lines (and yes, I know the policy affects when/whether the scrollbars appear) It's a doc problem, because there's nothing written on those functions that say what they do. And for me, nothing implicitly obvious by the method name to tell me that's what it does. So, an xref in the scrolledwindow doc (if you want it to do this, we encapsulated that behavior over yonder...), and some fleshing out at the methods.

--
____               .:.                 ____
Bryan W. Headley - bwheadley earthlink net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]