Re: Scrolling in a GtkTreeView...
- From: Carlos Savoretti <csavoretti clubsanjorge com ar>
- To: James Johnson <johnsjam comcast net>
- Cc: Gtk Mailing List <gtk-app-devel-list gnome org>
- Subject: Re: Scrolling in a GtkTreeView...
- Date: 14 Jul 2004 09:38:07 -0300
On Tue, 2004-07-13 at 13:24, James Johnson wrote:
I haven't actually done this but you might try using the signal:
"scroll-child" in conjunction with:
GtkAdjustment* gtk_scrolled_window_get_hadjustment(GtkScrolledWindow
*scrolled_window);
Then grab the max and min values of the adjustment and see if you have
reached those yet. If you have then you know the first/last row is
fully visible.
Let me know if this works...I was planning on trying it out and using
it if it did.
Thanks!
Jimmy
On Jul 12, 2004, at 3:06 PM, Carlos Savoretti wrote:
Hello all:
Is there a way to catch scrolling in a GtkTreeView (inside a
GtkScrolledWindow) to detect if the first / last row is visible.
Than you a lot for your help.
Carlos Savoretti
Av. Cordoba 1154.
Cap.Fed. ARGENTINA
csavoretti clubsanjorge com ar
...
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Well, I've tried but it didn't work. I didn't know why because it
sounds logic (it was one of the ways I had tried before).
Now the good news. I found the solution in my case using:
---
g_signal_connect((gpointer)
GTK_RANGE(
GTK_SCROLLED_WINDOW(scrolledwindow)->vscrollbar
),
"value_changed",
G_CALLBACK(on_scrolledwindow_vscrollbar_value_changed),
NULL);
---
and
---
static
void on_scrolledwindow_vscrollbar_value_changed(GtkRange *range,
gpointer user_data)
{
gdouble value = gtk_range_get_value(range);
/* Now we can use value... */
}
---
Let me know if it was useful for you.
Regards.
Carlos Savoretti
csavoretti clubsanjorge com ar
...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]