Re: XForms: Irix

Robert S. Mallozzi (mallors@crazyhorse.msfc.nasa.gov)
Wed, 2 Jul 1997 09:38:50 -0500 (CDT)

To subscribers of the xforms list from "Robert S. Mallozzi" <mallors@crazyhorse.msfc.nasa.gov> :

On 2 Jul, Harris Kosmidhs wrote:
> To subscribers of the xforms list from Harris Kosmidhs <pkosmhdh@med.auth.gr> :
>
> Hello. I am facing a problem with the Xforms library. (I'm too new!!!)
>
> I wrote a programm which among other thing it had a input box.
> (FL_NORMAL_INPUT)
>
> In my linux box it's just fine. I tried that on an Indogo Irix 5.3 and
> the input box was if I was typping a password that is not showing what I
> 'm writting. I tried on an O2 Irix 6.2 (with display in the previous
> Indogo) and had the same result.
>

I think your form is not correctly handling font sizes on different
systems. The font on the sgi is too big to fit in you input form, so
you see nothing. Use the function fl_scale_form()
to scale the form based on the size of the current font. I use
something like this:

/* Get a test string dimension; main form is scaled based on a
** "normal" size computed from a 75dpi font
*/
fl_get_string_dimension(FL_BOLD_STYLE, FL_NORMAL_SIZE, "TEST_STRING",
strlen("TEST_STRING"), &test_str_width, &test_str_height);

scale_width = (double) test_str_width / dpi75_width;
scale_height = (double) test_str_height / dpi75_height;

/* Scale form based on current font */
fl_scale_form(wids.main_form, scale_width, scale_height);

I used fl_get_string_dimension() to find the values dpi75_width,
dpi75_height for "TEST_STRING", which came out to be 89 and 14 on my
linux box.

-bob

-- 
Dr. Robert S. Mallozzi
University of Alabama in Huntsville
http://cspar.uah.edu/~mallozzir/

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html Xforms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/