RE: How to determine a widget is visible or not within a scrollw?



I know this might not be the best way to do it, but you might be able to do
the following

1. set up a event handler for grab_focus on the widgets inside the layout.
2. on the event, check to see if it is exposed, if not, move the scrolled
window down (the question is - how much).

Just a thought...

Regards,
Martyn

-----Original Message-----
From: Havoc Pennington [mailto:hp redhat com]
Sent: 23 February 2003 05:29
To: yanxin
Cc: gtk-app-devel-list gnome org
Subject: Re: How to determine a widget is visible or not within a
scrollw?


On Sat, Feb 22, 2003 at 03:55:25PM -0500, yanxin wrote:
I have a layout in a scrolled window, and some widgets inside the
layout. My question is, when I hit a tab key, the focus may go to a
widget which is not inside the current viewable area, how 
do I determine
this and automatically adjust the scrollbar and show the 
widget that has
just got the focus?

It should be happening automatically. Run "testgtk" from the GTK
distribution and tab around in the "scrolled window" test for example.
If it's not working file a small compilable test case showing it not
working on bugzilla.gnome.org

Havoc
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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