note 34 added to gtk.gtkclist.method.insert.php
| From: | mike at schrenk dot com | Date: | Sat, 08 Sep 2001 16:51:37 +0000 |
| Subject: | note 34 added to gtk.gtkclist.method.insert.php | ||
| Groups: | php.gtk.webmaster | ||
| Request: | Send a blank email to php-gtk-webmaster+get-32@lists.php.net to get a copy of this message | ||
the format for insert() is as follows:
insert(font, foregroundColor, backgroundColor, $string);
The following code works ...at least in the windows version. It creates a text box and writes red
text on a black background in the default font.
# start code sample
$fgColor = new GdkColor(65535, 0, 0);
$bgColor = new GdkColor(0, 0, 0);
// Add text to second box
$text = &new GtkText(NULL, NULL);
$text->set_editable(TRUE);
$text->insert(NULL, $fgColor, $bgColor, "this is my text.");
$vbox->pack_start($text, false, false);
$text->show();
# end code sample
Thanks !
--mike schrenk
http://gtk.php.net/manual/en/gtk.gtkclist.method.insert.php