finding a clist selection w/scrollbars
- From: Jeff Shipman <shippy nmt edu>
- To: GTK List <gtk-list gnome org>
- Subject: finding a clist selection w/scrollbars
- Date: Thu, 8 Mar 2001 22:57:50 -0700 (MST)
I've got a function that currently selects a random
row out of a CList. The only snag I'm running into
is that when the row is selected it doesn't automatically
cause the scrollbars to move to where that row is
visible in the viewable area. How can I move the scrollbars
so the row is visible?
I tried figuring out how large each row is adjustment
wise and then multiplying that by the row number, and
it works except for when you have to go near the bottom
of the list. It causes the scrollbar to go too far and
you end up going past the bottom of the list so it
may garble the text or cause the adjustment to jump
around. Unfortunately, the max value of the adjustment
isn't the bottom of the list, it's past the bottom of
the list, because I tried comparing against this
as well.
Any help would be greatly appreciated. Thanks
in advance.
Jeff "Shippy" Shipman E-Mail: shippy nmt edu
Computer Science Major ICQ: 1786493
New Mexico Institute of Mining and Technology
Homepage: http://www.nmt.edu/~shippy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]