Re: How to fix the GnomeCanvasItem?

"hj" <> writes:

> The coordinate of GnomeCanvasItemText will change when I resize the
> main window. I want to draw it at (10,10) pixel on the canvas. 
> How can I do?
>   GtkWidget *app;
>   GtkWidget *hbox;
>   GnomeCanvas *canvas;
>   GnomeCanvasItem *item;
>   hbox=gtk_hbox_new(FALSE,0);
>   canvas=(GnomeCanvas *)gnome_canvas_new();
>   gtk_box_pack_start(GTK_BOX(hbox),(GtkWidget *)canvas,TRUE,TRUE,0);
>   item=gnome_canvas_item_new(gnome_canvas_root(canvas),GNOME_TYPE_CANVAS_TEXT,"text","hello","x",10.0,"y",10.0,NULL);

The problem is that the the canvas centers itself in the 
allocated region. I think you might be able to control this
with gnome_canvas_set_scroll_region().

But you should ask on gnome-devel-list. This list is
for discussion of the discussion of the development
of GTK+ itself, not discussion of using GTK+ or


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]