canvasevents
- From: Benny Van Aerschot <bennyva myrealbox com>
- To: gtk-app-devel-list gnome org
- Subject: canvasevents
- Date: 18 Jul 2003 20:34:51 +0200
Im trying to make a diagram draggable. Here's what i do:
On the main Gnome.Canvas I draw several Gnome.CanvasGroups.
Each group has the following structure:
public class Diagram : Gnome.CanvasGroup {
public Diagram(Canvas c, CanvasGroup group) : base(group,
CanvasGroup.GType) {
CanvasWidget cw = new CanvasWidget(this);
Canvas canvas2 = Canvas.NewAa();
ScrolledWindow sw = new ScrolledWindow();
sw.Add(canvas2);
cw.Widget = sw;
CanvasText ct = new CanvasText(canvas2.Root());
CanvasRect cr = new CanvasRect(canvas2.Root());
this.CanvasEvent += new GnomeSharp.CanvasEventHandler(drag_event);
}
}
This is C#/Gtk# code to just draw a single Diagram on the main canvas.
So i basicly have the following:
CanvasText
in CanvasRect
in Canvas
in ScrolledWindow
in CanvasWidget
in CanvasGroup
The drag_event works in the sense that I can drag the diagram, but only
where the scrollwindow stops (this is the rightbottom corner).
Is there any way I can get the CanvasEvent to work on the entire diagram
(perhaps sending the event to the parent??)?
Thx,
Benny
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]