Re: GtkStatusbar

From: Date: Sun, 07 Sep 2003 18:49:22 +0000
Subject: Re: GtkStatusbar
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-3831@lists.php.net to get a copy of this message
> Steph: I understand how to put the widget into the app. I am having trouble > understanding how to put messages into the widget. > I understand what a stack is and how to use it, but I dont understand the > get_context_id() and passing around ID's bit. That's just how GTK works, it's not PHP-GTK specific. If you call pop() the parameter is the context id, not the string it belongs to. You can hard-code a context id, but it's pointless (it actually slows you down slightly) given that you can ask GTK to do it for you and it will arrange the stack more nicely. I'm afraid I don't understand what you mean by the 'passing around ID's bit'.. if you're referring to the array of possible messages, that's just the way that particular example was set up (because that's the way it seemed most likely to me to be used). The variable $i is set according to the value that was sent from the keyboard, and refers to the position in the message array of the appropriate message. It's passed back to the function because otherwise there's no way to find which context id to call with pop(). HTH - Steph

« previous php.gtk.general (#3831) next »