Re: Dynamic Resizing of Drawing Area

Wednesday, August 14, 2002, 10:28:15 PM, you wrote:
> I want to change the size of my drawing area dynamically based on
> the size of the image that is being shown in it. But if I declare
> the size initially as :
>     gtk_widget_set_size_request (GTK_WIDGET (main_draw), 2400, 2400);
> then, later, if i again try to set the size of the now visible
> drawing area using 'gtk_widget_set_size_request' then I get a
> Seg_Fault.
I use following code and it works ok for me (I use GTK+ 2.0.3 on Windows)
    GTK_WIDGET (lookup_widget (GTK_WIDGET (EditWindow), "EditDrawingArea")),
    project->layerwidth, project->layerheight);

May be you does not assign right value to your main_draw variable? :-)
Try assert().

Alexander Chemeris

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