Re: Preventing drawing area resizing
- From: Olexiy Avramchenko <ath beast stu cn ua>
- To: Jean-marc Harang <jean-marc harang laposte net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Preventing drawing area resizing
- Date: Sat, 05 Oct 2002 13:45:47 +0300
Jean-marc Harang wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le Vendredi 4 Octobre 2002 18:44, Olexiy Avramchenko a écrit :
Bryan Brown wrote:
Using gtk 1.2, how does one prevent the user from resizing a drawing area?
Using "gtk_widget_set_usize" I can set the minimum size, but I'd like to
be able set either the maximum size or prevent resizing at all.
You can pack your drawing area into GtkAlignment container widget.
Use xscale=yscale=0 to prevent resizing.
*Note* you can receive "configure_event" events for drawing area ever
it width and height remains unchanged. This is the feature of both
GtkAlignment
and GtkDrawingArea (looks strange, doesnt it ?;).
Not really, because a first notify is useful. They didn't add an interne flag
"First notify = true", perhaps for memory reason (and others, like
complexity... ).
I dont mean the first "configure_event" (coming after drawing area get
realized).
I just noted that when your drawing area is packed into GtkAlignment with
xscale=yscale=0 its size *will remain unchanged* when you are trying to
resize
container. But you *will receive "configure_event" signal* every time the
GtkAlignment *will try to resize his child. I had some troubles with
this in the
past when I used GtkAlignment with zero scales and had expected that
configure
will not be emitted when resizing such container.
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]