Re: Gnome canvas



> But when I resize the windows and when the windows size is bigger than
> my scroll region (600x300) the rect item comes to the windows center.
> And know, it seems that the cursor returns bad cursor position. The
> canvas event return a position where 0,0 is the top left position off
> the windows and the group and rect item return a position where 0,0 is
> the top left of the rect item. In this case I expected to have for all
> events the same coordonates like in the previous exemple.
> Is it a normal situation ? Can you explain me that ?
>

When the window size exceeds the canvas's scroll region,
 the whole canvas is centred in the window. Annoying, but normal.

> I would like that the items I will add to the canvas stays at the top of
> the windows when I resize it. Is it possible and how can I do that ?
>
> And my last question is, how can I resize my background rect item to fit
> the windows size ?

connect to the size_allocate signal of the canvas, and when it is changed
change the scroll region and the "x2" and "y2" arguments of the background
rectangle
gnome_canvas_item_set (item, "x2", (double)whatever, "y2", (double)
whatever, NULL);

iain





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