Yeah, I know about catching the underlying change in the value of the
adjustment. I was just looking for a convenient way to trap manual
adjustments to the scrollbar because I am also changing the adjustment
value programmatically.
btw, if this event does nothing for consumers of the class, perhaps it
would remove confusion to not expose it as public?
thanks,
Scott
On Fri, 2005-11-11 at 00:58 -0800, Eric Butler wrote:
> The C docs for this say "Virtual function that moves the slider. Used
> for keybindings.". I have no idea what that actually means, but it
> seems to imply that you shouldn't use it.
>
> The "ChangeValue" event seems to work just fine.
>
> On 11/9/05, Scott Ellington <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Below is some simple code that tries to catch a MoveSlider event on a
> > Scrollbar. I expect that when the scrollbar is adjusted, this event
> > will trigger. It seems to not. Am I missing something?
> >
> > thanks.
> > Scott
> >
> > ---------------
> >
> > using System;
> > using Gtk;
> >
> > class SliderSample
> > {
> > static void Main ()
> > {
> > new SliderSample ();
> > }
> >
> > SliderSample ()
> > {
> > Application.Init ();
> > Window win = new Window ("SliderSample");
> > win.DeleteEvent += new DeleteEventHandler (OnWinDelete);
> > win.SetDefaultSize (400, 400);
> >
> > Adjustment a = new Adjustment (30,0,100,1,5,20);
> > VScrollbar vs = new VScrollbar (a);
> > vs.MoveSlider += new MoveSliderHandler (ScrollbarAdjusted);
> >
> > win.Add (vs);
> > win.ShowAll ();
> > Application.Run ();
> > }
> >
> > void OnWinDelete (object obj, DeleteEventArgs args)
> > {
> > Application.Quit ();
> > }
> >
> > void ScrollbarAdjusted (object o, MoveSliderArgs args)
> > {
> > Console.WriteLine("Scrolled: " + args.Scroll);
> > }
> > }
> >
> > _______________________________________________
> > Gtk-sharp-list maillist - [email protected]
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> >
--
Scott Ellington <[EMAIL PROTECTED]>
_______________________________________________
Gtk-sharp-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list