Hi, I looking for good solution for this functionality: I have application with one text field and one button widget When I click on the button I would like to add next text field, and so on ... So I need add new widget on form during application working. I will be grateful for any example ... thx. -- Robert Mitwicki Kontakt: ? ?? jid: mitfik at jabber.org ? ?? e-mail: mitfik at gmail.com ------------------------------------------ www.partiapiratow.org.pl
2010/9/5 Robert Mitwicki <mitfik at gmail.com>:> Hi, > > I looking for good solution for this functionality: > > I have application with one text field and one button widget > > When I click on the button I would like to add next text field, and so on ...You connect a click event handler in regular way and then add widgets the regular way as well. You just need to call "recalc" or "refresh" (or both; check that in the docs or just try which works) on parent widget (probably the main window) later. -- Matma Rex - http://matma-rex.prv.pl/
Monday, September 6, 2010, 10:07:51 AM, you wrote: BD> 2010/9/5 Robert Mitwicki <mitfik at gmail.com>:>> Hi,>> I looking for good solution for this functionality:>> I have application with one text field and one button widget>> When I click on the button I would like to add next text field, and so on ...BD> You connect a click event handler in regular way and then add widgets BD> the regular way as well. You just need to call "recalc" or "refresh" BD> (or both; check that in the docs or just try which works) on parent BD> widget (probably the main window) later. The thing that causes most bugs with dynamically created widgets is a failure to call "create". I highly recommend Lyle Johnson''s (e)Book for a full explanation about how to do what you want. Btw ... the creation of dynamically created widgets is beyond my skill set or I would provide an example. I have not, as yet, gotten that to work. Lyle, can I post the example from your book? Yuo''ll want to focus on section 7.7 of his book: Client-Side vs. Server-Side Objects Ralph -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100906/7b744a34/attachment.html>
Hi Robert, Look for a post called "Adding / Deleting controls dynamically", there is the example you are searching for. Best regards, Philippe Lang ------------------------------------------------------------- Attik System web : http://www.attiksystem.ch Philippe Lang phone: +41 26 422 13 75 rte de la Fonderie 2 gsm : +41 79 351 49 94 1700 Fribourg pgp : http://keyserver.pgp.com> -----Message d''origine----- > De?: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users- > bounces at rubyforge.org] De la part de Robert Mitwicki > Envoy??: dimanche 5 septembre 2010 22:23 > ??: fxruby-users at rubyforge.org > Objet?: [fxruby-users] Adding dynamic widget > > Hi, > > I looking for good solution for this functionality: > > I have application with one text field and one button widget > > When I click on the button I would like to add next text field, and so > on ... > > So I need add new widget on form during application working. > I will be grateful for any example ... > > thx. > > > > > -- > Robert Mitwicki > Kontakt: > ? ?? jid: mitfik at jabber.org > ? ?? e-mail: mitfik at gmail.com > ------------------------------------------ > > www.partiapiratow.org.pl > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 474 bytes Desc: not available URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100907/af58280e/attachment.bin>
On Sun, Sep 5, 2010 at 10:23 PM, Robert Mitwicki <mitfik at gmail.com> wrote:> Hi, > > I looking for good solution for this functionality: > > I have application with one text field and one button widget > > When I click on the button I would like to add next text field, and so on > ... > > So I need add new widget on form during application working. > I will be grateful for any example ... >You might want to take a look at foxguib source code which does dynamic manipulation of the widget tree all the time. Tip, search for "relink" (if I remember correctly ;) http://fox-tool.rubyforge.org/ hth, -- henon> > thx. > > > > > -- > Robert Mitwicki > Kontakt: > jid: mitfik at jabber.org > e-mail: mitfik at gmail.com > ------------------------------------------ > > www.partiapiratow.org.pl > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100907/fb6999d5/attachment.html>
Thanks a lot this post help me a lot "Adding / Deleting controls dynamically" 2010/9/7 Philippe Lang <philippe.lang at attiksystem.ch>:> Hi Robert, > > Look for a post called "Adding / Deleting controls dynamically", there is the example you are searching for. > > Best regards, > > Philippe Lang > > ------------------------------------------------------------- > Attik System ? ? ? ? ? ? ?web ?: http://www.attiksystem.ch > Philippe Lang ? ? ? ? ? ? phone: +41 26 422 13 75 > rte de la Fonderie 2 ? ? ?gsm ?: +41 79 351 49 94 > 1700 Fribourg ? ? ? ? ? ? pgp ?: http://keyserver.pgp.com > > >> -----Message d''origine----- >> De?: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users- >> bounces at rubyforge.org] De la part de Robert Mitwicki >> Envoy??: dimanche 5 septembre 2010 22:23 >> ??: fxruby-users at rubyforge.org >> Objet?: [fxruby-users] Adding dynamic widget >> >> Hi, >> >> I looking for good solution for this functionality: >> >> I have application with one text field and one button widget >> >> When I click on the button I would like to add next text field, and so >> on ... >> >> So I need add new widget on form during application working. >> I will be grateful for any example ... >> >> thx. >> >> >> >> >> -- >> Robert Mitwicki >> Kontakt: >> ? ?? jid: mitfik at jabber.org >> ? ?? e-mail: mitfik at gmail.com >> ------------------------------------------ >> >> www.partiapiratow.org.pl >> _______________________________________________ >> fxruby-users mailing list >> fxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/fxruby-users > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users >-- Robert Mitwicki Kontakt: ? ?? jid: mitfik at jabber.org ? ?? e-mail: mitfik at gmail.com ------------------------------------------ www.partiapiratow.org.pl