зеркало из https://github.com/mono/mail-archives.git
85 строки
3.1 KiB
HTML
85 строки
3.1 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|||
|
<HTML>
|
|||
|
<HEAD>
|
|||
|
<TITLE> [Gtk-sharp-list] Drawing Area and Mouse Button Signals
|
|||
|
</TITLE>
|
|||
|
<LINK REL="Index" HREF="index.html" >
|
|||
|
<LINK REL="made" HREF="mailto:mvsl%40telefonica.net">
|
|||
|
<META NAME="robots" CONTENT="index,nofollow">
|
|||
|
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|||
|
<LINK REL="Previous" HREF="004760.html">
|
|||
|
<LINK REL="Next" HREF="004763.html">
|
|||
|
</HEAD>
|
|||
|
<BODY BGCOLOR="#ffffff">
|
|||
|
<H1>[Gtk-sharp-list] Drawing Area and Mouse Button Signals
|
|||
|
</H1>
|
|||
|
<B>"Manuel V. Santos L<>pez"
|
|||
|
</B>
|
|||
|
<A HREF="mailto:mvsl%40telefonica.net"
|
|||
|
TITLE="[Gtk-sharp-list] Drawing Area and Mouse Button Signals">mvsl@telefonica.net
|
|||
|
</A><BR>
|
|||
|
<I>Tue, 24 Aug 2004 23:44:32 +0200</I>
|
|||
|
<P><UL>
|
|||
|
<LI> Previous message: <A HREF="004760.html">[Gtk-sharp-list] Drawing Area and Mouse Button Signals
|
|||
|
</A></li>
|
|||
|
<LI> Next message: <A HREF="004763.html">[Gtk-sharp-list] Drawing Area and Mouse Button Signals
|
|||
|
</A></li>
|
|||
|
<LI> <B>Messages sorted by:</B>
|
|||
|
<a href="date.html#4761">[ date ]</a>
|
|||
|
<a href="thread.html#4761">[ thread ]</a>
|
|||
|
<a href="subject.html#4761">[ subject ]</a>
|
|||
|
<a href="author.html#4761">[ author ]</a>
|
|||
|
</LI>
|
|||
|
</UL>
|
|||
|
<HR>
|
|||
|
<!--beginarticle-->
|
|||
|
<PRE>Hi,
|
|||
|
|
|||
|
you should set the event mask before realizing the drawingarea.
|
|||
|
|
|||
|
The code should read:
|
|||
|
|
|||
|
><i> drawingarea = new Gtk.DrawingArea();
|
|||
|
</I>><i> drawingarea.SetSizeRequest(700, 400);
|
|||
|
</I>-----> // vbox2.PackEnd(drawingarea);
|
|||
|
><i>
|
|||
|
</I>><i> drawingarea.ExposeEvent += new ExposeEventHandler(drawingarea_expose_event_cb);
|
|||
|
</I>><i> drawingarea.ConfigureEvent += new ConfigureEventHandler(drawingarea_configure_event_cb);
|
|||
|
</I>><i> drawingarea.MotionNotifyEvent += new MotionNotifyEventHandler(drawingarea_motion_notify_event_cb);
|
|||
|
</I>><i> drawingarea.ButtonPressEvent += new ButtonPressEventHandler(drawingarea_button_press_event_cb);
|
|||
|
</I>><i> drawingarea.Events = EventMask.ExposureMask | EventMask.LeaveNotifyMask |
|
|||
|
</I>><i> EventMask.ButtonPressMask | EventMask.PointerMotionMask |
|
|||
|
</I>><i> EventMask.PointerMotionHintMask;
|
|||
|
</I>><i>
|
|||
|
</I>><i> drawingarea.CanFocus = true;
|
|||
|
</I>><i> drawingarea.GrabFocus();
|
|||
|
</I>><i>
|
|||
|
</I>><i> canvas = new DamageCanvas(drawingarea);
|
|||
|
</I>-----> vbox2.PackEnd(drawingarea);
|
|||
|
|
|||
|
><i> main_window.Resize(800, 500);
|
|||
|
</I>><i>
|
|||
|
</I>
|
|||
|
Hope it helps you.
|
|||
|
|
|||
|
Greetings,
|
|||
|
Manuel V. Santos L<>pez.
|
|||
|
|
|||
|
</PRE>
|
|||
|
<!--endarticle-->
|
|||
|
<HR>
|
|||
|
<P><UL>
|
|||
|
<!--threads-->
|
|||
|
<LI> Previous message: <A HREF="004760.html">[Gtk-sharp-list] Drawing Area and Mouse Button Signals
|
|||
|
</A></li>
|
|||
|
<LI> Next message: <A HREF="004763.html">[Gtk-sharp-list] Drawing Area and Mouse Button Signals
|
|||
|
</A></li>
|
|||
|
<LI> <B>Messages sorted by:</B>
|
|||
|
<a href="date.html#4761">[ date ]</a>
|
|||
|
<a href="thread.html#4761">[ thread ]</a>
|
|||
|
<a href="subject.html#4761">[ subject ]</a>
|
|||
|
<a href="author.html#4761">[ author ]</a>
|
|||
|
</LI>
|
|||
|
</UL>
|
|||
|
</body></html>
|