Re: [Java-gnome-developer] auto-scroll in ScrolledWindow
Brought to you by:
afcowie
From: pancake <pa...@ph...> - 2006-04-28 15:21:29
|
great! :) Type a tutorial or document't in the web page. I think is the better way to share knowledge. --pancake On Fri, 28 Apr 2006 16:54:23 +0200 Manuel Clos <ll...@us...> wrote: > Hi all, > > Here is how I got auto-scroll working. By auto-scroll, I mean the > (vertical) scrollbar automatically move when a hidden widget gets focus, > so you can *automatically* view that widget instead of manually doing > the scroll. > > How it should work: > > vbox.setFocusVAdjustment(scrolledWindow.getVAdjustment()); > > setFocusVAdjustment() is missing in java-gnome (Container class). > > > This is clumsy, but it works _now_: > > // since the method is protected, extend the class to reveal it > public class Container2 extends Container { > > // constructor ignored > > public static void gtk_container_set_focus_vadjustment2(Handle a, > Handle b) { > gtk_container_set_focus_vadjustment(a, b); > } > } > > > // code in the program > Container2.gtk_container_set_focus_vadjustment2(vbox1.getHandle(), > scrolledWindow.getVAdjustment().getHandle()); > > > ... and it works! really ;) > > Hope it helps! > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |