[Monodevelop-patches-list] r2647 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Wed Jul 13 17:27:58 EDT 2005
Author: jluke
Date: 2005-07-13 17:27:58 -0400 (Wed, 13 Jul 2005)
New Revision: 2647
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs
Log:
* CodeCompletion/ListWindow.cs: scroll with the mousewheel
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-07-13 18:16:10 UTC (rev 2646)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-07-13 21:27:58 UTC (rev 2647)
@@ -1,3 +1,7 @@
+2005-07-13 John Luke <john.luke at gmail.com>
+
+ * CodeCompletion/ListWindow.cs: scroll with the mousewheel
+
2005-07-13 Lluis Sanchez Gual <lluis at novell.com>
* Gui/SourceEditorDisplayBinding.cs: The editor is now responsible
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs 2005-07-13 18:16:10 UTC (rev 2646)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ListWindow.cs 2005-07-13 21:27:58 UTC (rev 2647)
@@ -24,6 +24,7 @@
list = new ListWidget (this);
list.SelectionChanged += new EventHandler (OnSelectionChanged);
+ list.ScrollEvent += new ScrollEventHandler (OnScrolled);
box.PackStart (list, true, true, 0);
this.BorderWidth = 1;
@@ -207,6 +208,14 @@
{
list.Page = (int) scrollbar.Value;
}
+
+ void OnScrolled (object o, ScrollEventArgs args)
+ {
+ if (args.Event.Direction == Gdk.ScrollDirection.Up)
+ scrollbar.Value --;
+ else if (args.Event.Direction == Gdk.ScrollDirection.Down)
+ scrollbar.Value ++;
+ }
void OnSelectionChanged (object o, EventArgs args)
{
@@ -348,14 +357,14 @@
return true;
}
-
+
protected override bool OnExposeEvent (Gdk.EventExpose args)
{
base.OnExposeEvent (args);
DrawList ();
return true;
}
-
+
void DrawList ()
{
int winWidth, winHeight;
More information about the Monodevelop-patches-list
mailing list