Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Nuno G. on May 06, 2014, 11:11:55 am



Title: Form pack
Post by: Nuno G. on May 06, 2014, 11:11:55 am
I wonder if it would possible to implement an equivalent to the Java JFrame.pack.
Sometimes one has the need to hide or show form elements depending on several conditions and it, now and then, it results on a very ugly form with lots of unnecessary empty spaces.
TIA


Title: Re: Form pack
Post by: Leo S. on May 28, 2014, 12:52:57 am
Hi Nuno, could you please post sample code of what you mean ?
Are you hiding/showing things at run time ?
Regards, Leo


Title: Re: Form pack
Post by: Nuno G. on May 28, 2014, 09:24:37 am
Hi Leo.
   I don't have any specific code sample to send you but the idea is the one you guessed: hide and show items at runtime. When you do so (and we do it a lot) forms get quite "empty" after hidding something and you would be nice to have a way to "repack" the interface after changes.
   But I must tell you I was not expecting a quick response to this subject, since, like we say around here, we can live quite nicely with it. It was just an idea to present to Fourjs in the hope that somewhere in the future we could see this features included in a new version.
   This said, thank you very much for you answer, but, I repeat, this is not an urgent matter.
   Best regards
   Nuno


Title: Re: Form pack
Post by: Reuben B. on June 06, 2014, 12:00:01 am
Nuno,

Neither of these match your requirement 100% but might be able to help ...

https://4js.com/online_documentation/fjs-gdc-manual-html/#c_gdc_NewFeatures221_save_restore_current_window_size.html

https://4js.com/online_documentation/fjs-gdc-manual-html/#c_gdc_NewFeatures230_adapt_window_to_new_form_size.html

... also how you design the form initially can influence what happens when you hide/show elements

Reuben


Title: Re: Form pack
Post by: Nuno G. on June 17, 2014, 02:35:50 pm
Thank you Leo!