Re: XForms: Browser resizing

Danny Uy (dau@westworld.com)
Mon, 1 Sep 1997 15:10:22 -0700 (PDT)

To subscribers of the xforms list from Danny Uy <dau@westworld.com> :

>
> To subscribers of the xforms list from "Robert S. Mallozzi" <mallors@crazyhorse.msfc.nasa.gov> :
>
> On 1 Sep, Danny Uy wrote:
> > To subscribers of the xforms list from Danny Uy <dau@westworld.com> :
> >
> > I don't think you'd need to check the number of chars in the line. Simply
> > check for the return value of fl_get_string_width(). A greater number of
> > characters does not necessarily mean a longer string width.
> >
>
> Of course you are right, one should check only the string width with
> fl_get_string_width(), as two lines could have the same number of
> characters yet differ in pixel width. That is what I get for writing
> code at midnight :-)
>
> However, in the test case I posted, this will not matter; the text is
> still clipped. Also, looking over the code, I see that there seems to
> be no way to set the size of the text area of a browser. You can only
> set the whole width, including the scrollbar, but you do not know the
> width of the scrollbar unless you set it explicitly. As stated in the
> manual, the default size of the scrollbar is based on the initial size
> of the browser.
>
> So, in addition to fl_get_browser_dimension(), we need either
> fl_get_scrollbar_dimension(), or fl_set_browser_dimension() ??
> Or is there a way to set the browser width now, w/out knowing the
> scrollbar size?
>
Unfortunately, I don't think we have these routines available yet (TC?). If
you look closely at the browser, though, you will note that the text begins
a few pixels off to right of the left margin. It seems to me to be the exact
amount of clipping that occurs on the right margin.

What I have been doing with my own browsers was simply to add 25-30 pixels
to the max string width. This is sufficient to offset the width of the
vertical scrollbar and the offset that I imagine on the left margin.

Best wishes,
Danny Uy
dau@westworld.com
_________________________________________________
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/