Re: [gtk-list] programmatically scroll a clist?
- From: Karl Nelson <kenelson ece ucdavis edu>
- To: gtk-list redhat com
- cc: kenelson sequoia ece ucdavis edu
- Subject: Re: [gtk-list] programmatically scroll a clist?
- Date: Fri, 29 Oct 1999 17:24:59 -0700
> I need to programmatically scroll a clist.
> How is this done?
>
> Library version: gtk+ 1.2.3, Gtk-- 1.0.2
> The following code fragment lets the mouse scroll the clist.
> I plan to use the scrollbar, but need to scroll in software.
>
> Gtk_Adjustment *_adjustment;
> Gtk_VScrollbar * _scrollbar;
> Gtk_CList * _av_list;
>
> _adjustment = new Gtk_Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0 );
Shouldn't there be some range of values in the adjustment as well
as a step size?
> _scrollbar = new Gtk_VScrollbar( *_adjustment );
> _av_list = new Gtk_CList( 2, 0 );
> _av_list->set_vadjustment( *_adjustment );
I believe that you use Gtk_Adjustment::set_value(gfloat) to issue
a change of value to the adjustment which updates the scrollbar.
--Karl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]