Re: Why check menu item always return FALSE ?



On Fri, Aug 13, 2004 at 03:55:48PM +0800, jacky618 jacky618 wrote:
> 
>  I have made a check menu with Gtk+, however, it always returns FALSE:
> 
>    if (GTK_CHECK_MENU_ITEM(ckMnItem)->active == TRUE)

Never access the widget struct directly (except for fields
declared public). Alaways do

    if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(ckMnItem)))
        ...

Using (something == TRUE) instead of (something) is not an
excellent idea either.

Yeti


--
Do not use tab characters. Their effect is not predictable.



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