GtkCombo, GtkEntry question
| From: | Benjamin Smith | Date: | Tue, 28 Jun 2005 20:24:34 +0000 |
| Subject: | GtkCombo, GtkEntry question | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-5902@lists.php.net to get a copy of this message | ||
Why doesn't this code work as expected?
I'm expecting to see a window with a GtkEntry widget in the middle - but the
GtkEntry widget seems to be a no-show. It works fine if I put the Combo into
$win, but I want to just put the $entry widget...
<?
$combo=&New GtkCombo();
$entry=$combo->entry;
$entry->Set_Text('foo');
$win=&New GtkWindow();
$win->Set_Usize(200, 200);
$win->Add($entry);
$win->Show_All();
?>
(The reason is that I have a selection list that people can choose from,
unless the record wasn't manually entered. Then, I want to populate the field
from the database, and make it so you can't change the GtkCombo widget. Since
there appears to be no method in GtkCombo() to do that, I'd like to just
display the GtkEntry widget, without breaking other callbacks that depend on
the GtkCombo widget)
-Ben
--
"The best way to predict the future is to invent it."
- XEROX PARC slogan, circa 1978