[Gtk-sharp-list] Scrollbar.MoveSlider

Eric Butler eric at extremeboredom.net
Fri Nov 11 03:58:18 EST 2005


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 <scottellington at comcast.net> 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  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>


More information about the Gtk-sharp-list mailing list