Re: [PHP-GTK] reading value from an Gtkentry() ?
[email protected] (g) Wed, 8 Aug 2001 01:21:56 +0200
| Newsgroups | php.gtk |
|---|---|
| Message-ID | <[email protected]> |
tnx a lot :) i just signed up for this list so i mist your answer the first time. but i wasnt to far off ;) this question probably gets asked a lot i guess. (probably right after: how do i create a text entry) maybe its a good idea to put this one in a faq somewhere. oh, one more question, if you open a child window, and close it again with Gtk::main_quit(); it destroys all windows (which is sort of obvious) is it possible to destroy only the newest window? tnx gilles On Tuesday 07 August 2001 11:49 pm, you wrote: > I'm not going to advertise on the list twice in the same half hour ... > http://www.deafcat.f2s.com/gubbins.php?class=GtkEntry might help you out. > Or might not. > > ;) > > Good luck. > > ----- Original Message ----- > From: "g" <[email protected]> > To: <[email protected]> > Sent: Tuesday, August 07, 2001 10:52 PM > Subject: [PHP-GTK] reading value from an Gtkentry() ? > > > hi, > > i played around with php-gtk for a little while, > i followed a few tutorials, read through source code and im now able to > create containers, boxes, buttons, entry fields, new windows etc etc... > > but im totaly lost on 'business logic' side of things here. > > my question: > > for instance, > how does one connect a button to an entry field so that the typed in text > gets stored in a var after clicking the button? > > example code snippet of how i expected it to work: > ------------------------------------------- > // a var to store the result in > $daText=""; > > // a happy entry field > $anEntry = &new Gtkentry(); > $anEntry->select_region(0,5); > $aBox->pack_start($anEntry); > $anEntry->show(); > > // a jolly button > $aButton->&new Gtkbutton('OK'); > $aButton->connect('clicked','dosomething($anEntry)'); // doesnt work! > $aBox->pack_start($aButton); > $aButton->show(); > > // this following function is also wrong but it might give you the > // general idea of what im trying to accomplish > > function dosomething($entryObj){ > > $daText=$entryObj->getValue(); > > } > ------------------------------------------- > > hope someone can help me out here since there isnt any nice > documentation yet, that is, > i havent found any yet. > but i really like this gtk stuff allready!