Steve,
I have written the attached piece of code to resize a dialog so that labels
will fit within button objects. It's basically a wrapper for
fl_adjust_form_size that also checks any tabfolders when ascertaining the
required scaling size.
It also demonstrates why fl_adjust_form_size should be split into two
functions, one to ascertain the required scaling and one to do that scaling
(I draw your attention to the get_scaling_factor routine ;-)
Would it be possible for you to do this? Ie,
double fl_adjust_form_size(FL_FORM * form)
{
double const scale = fl_get_scale_to_fit(form);
fl_scale_form(form, scale, scale);
}
Ok, not before 1.0 comes out, but sometime thereafter ;-)
Incidentally, this code here is C++ that is almost C. It would be trivially
easy to turn it into C code and shove it into the library to give you a clean
way of resizing dialogs with tabfolders. If you want it, it's yours.
Regards,
Angus
This archive was generated by hypermail 2b29 : Fri Nov 08 2002 - 07:08:22 EST