Re: size-request



Jamie Guinan <guinan bluebutton com> writes:
> I have an application in which I want to use a GtkDrawingArea, 
> and I want to control how it responds to size-request events.
> 
> Should I,
> 
> A. Connect to the "size-request" signal?   Does modifying
>    requisition->width/height in a handler have any effect?
>

It ought to, if you connect_after, but I've had it not work in the
past I think. Maybe I was doing something weird. You must
connect_after though or the default handler will overwrite what you
put in.
 
> B. Derive a new class and override GtkWidget::size_request?

That works too.

> C. Something else?

What gtk_widget_set_usize() does is set the size request, so maybe you
can just do that.

Havoc



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