Re: bug in gtk-- ?
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: "Andrew V. Shuvalov" <andrew ecsl cs sunysb edu>
- cc: "gnome-list gnome org" <gnome-list gnome org>
- Subject: Re: bug in gtk-- ?
- Date: Tue, 29 Sep 1998 11:15:06 -0500 (CDT)
On Tue, 29 Sep 1998, Andrew V. Shuvalov wrote:
> Hi! I have a problem with recent cvs Gtk-- and gtk+-1.1.2-1:
> This bug was not here before, i mean i did not changed my code.
> I have a subclass from Gtk_Button. And when i am in constructor,
> GTK_WIDGET( gtkobject )->window is still NULL. My code:
>
window isn't guaranteed to exist until the object is realized. It may
exist, but there is no guarantee.
You can either force realize, or do your drawing at a later time, after
realization. For drawing areas the easiest thing is to override
configure_event_impl. For buttons you aren't really meant to be accessing
the window, I don't think.
Why not just add a child to the button, such as a drawing area or pixmap
or label or whatever you want?
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]