Re: GtkCombo, GtkEntry question
| From: | Madeleine D. | Date: | Tue, 28 Jun 2005 21:14:23 +0000 |
| Subject: | Re: GtkCombo, GtkEntry question | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5903@lists.php.net to get a copy of this message | ||
Ben -
I don't believe you can do this. The $entry is not a separate widget, but
the entry property of the combo widget. As such, it's not an object to be
added anywhere.
Can you clarify a little what you're trying to achieve here? You can set
the combo box so it the content can't be changed, but I'm not sure if that
is the same thing as what you're after.
Madeleine D.
At 01:24 PM 6/28/05 -0700, Benjamin Smith wrote:
>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
>
>--
>PHP-GTK General Mailing List (http://gtk.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>