Re: How to fix the GnomeCanvasItem?
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: How to fix the GnomeCanvasItem?
- Date: 17 Aug 1999 10:12:12 -0400
"hj" <webmaster@hj.ourfamily.com> 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
GNOME.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]