Re: [gtk-list] Re: How to use GtkText?



Hello, Karl,

> 
> >>>>> "Cheng-Chang" == Cheng-Chang Wu <C.Wu@ping.de> writes:
> 
>     Cheng-Chang>   font = gdk_font_load
>     Cheng-Chang> ("adobe-times-bold-i-normal--25-180-100-100-p-128-iso8859-1");
>                                             ^^
>  I just lit up the font specification above, and then used `C-button3'
> over an XTerm to set its font to `selection', so I could see if I was
> right about your fontspec being wrong.  Looks like a typo.
> 
I am just too new to X-programming to get it right ;)
 "-adobe...." is the right answer. 
  ^
>  I guess that your app ought to not bomb with sigsegv over it though;
> the real error should be reported, right?
> 
I should have set up the hierarchy before I gtk_text_realize the text,
said Owen Taylor. And gtk should be cheated so that the text is
recognized as basic type.

    gtk_container_add (GTK_CONTAINER (window), button);
    GTK_WIDGET_SET_FLAGS (text, GTK_BASIC);
    gtk_container_add (GTK_CONTAINER (button), text);
    gtk_text_realize (GTK_TEXT (text));
    gtk_text_insert (GTK_TEXT (text), .... 

After all that trouble, I found the result is not all that desirable,
but an interesting experience ;)

Cheng-Chang Wu



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