Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[XForms] Movement of widgets on a form when resized

0 views
Skip to first unread message

Sian Mountbatten

unread,
Feb 16, 2012, 6:10:18 AM2/16/12
to xforms-de...@nongnu.org
Dear All

How is it possible to stop the buttons on a form from changing
their position when the form is resized. I want the browser on
the form to get bigger, but I want the buttons to stay put.
What do I have to do to get this behaviour?

Any hints would be welcome.

Regards
--
Sian Mountbatten
Algol 68 specialist

Jens Thoms Toerring

unread,
Feb 16, 2012, 7:46:12 AM2/16/12
to Development with and of XForms
Hi Sian,

On Thu, Feb 16, 2012 at 11:09:50AM +0000, Sian Mountbatten wrote:
> How is it possible to stop the buttons on a form from changing
> their position when the form is resized. I want the browser on
> the form to get bigger, but I want the buttons to stay put.
> What do I have to do to get this behaviour?

You have to set a "gravity" for the objects that you want stay
put. The function you need for that is fl_set_object_gravity()
which allows to tell the program if the upper left hand and
the lower right hand corner of an object are to be fixed rela-
tiv to the sides of the forms. E.g. if you call

fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest );

then the object will stay fixed relative to the top left hand
corner of the form it belongs to (or the group it may belong
to).

The whole thing is described in the documentation in chapter
4 "Doing Interaction", see e.g.

http://xforms-toolkit.org/doc/xforms_6.html

There's also a demo program, 'grav', that shows some of the
effects the gravity setting for an object has (and also how
this might influence resizing of the object - if you e.g.
fix the objects upper left hand corner to the corresponging
corner of the form and its lower right hand corner to the
oppostite corner of the form it must grow when you enlarge
the form etc.).
Best regards, Jens
--
\ Jens Thoms Toerring ________ j...@toerring.de
\_______________________________ http://toerring.de

Sian Mountbatten

unread,
Feb 16, 2012, 2:29:44 PM2/16/12
to xforms-de...@nongnu.org
On Thu, 16 Feb 2012 13:45:37 +0100
Jens Thoms Toerring <j...@toerring.de> wrote:

> Hi Sian,
>
> On Thu, Feb 16, 2012 at 11:09:50AM +0000, Sian Mountbatten wrote:
> > How is it possible to stop the buttons on a form from changing
<snip>
> You have to set a "gravity" for the objects that you want stay
> put. The function you need for that is fl_set_object_gravity()
> which allows to tell the program if the upper left hand and
> the lower right hand corner of an object are to be fixed rela-
> tiv to the sides of the forms. E.g. if you call
>
> fl_set_object_gravity( obj, FL_NorthWest, FL_NorthWest );
>
> then the object will stay fixed relative to the top left hand
> corner of the form it belongs to (or the group it may belong
> to).
Thank you very much for bringing this to my attention. Your
reply has helped me solve the problem. Again, two minds are
better than one. Now my file viewer is ready for uploading to
my web-site <www.poenikatu.co.uk>.

<Beginning of advert>
Incidentally, I am using the programming language Algol 68 to
interface with the Xforms library. I have implemented an Algol
68 binding for the library which means that Algol 68 programs
do not use forms.h. I also use a literate programming system
which is especially adapted for Algol 68. It is called Web 68
and is also on my web-site.
<End of advert>

> The whole thing is described in the documentation in chapter
> 4 "Doing Interaction", see e.g.
>
> http://xforms-toolkit.org/doc/xforms_6.html
>
> There's also a demo program, 'grav', that shows some of the
> effects the gravity setting for an object has (and also how
> this might influence resizing of the object - if you e.g.
> fix the objects upper left hand corner to the corresponging
> corner of the form and its lower right hand corner to the
> oppostite corner of the form it must grow when you enlarge
> the form etc.).
> Best regards, Jens
The grav program was also helpful.

Jens Thoms Toerring

unread,
Feb 18, 2012, 5:50:48 PM2/18/12
to Sian Mountbatten, xforms-de...@nongnu.org
Hi Sian,

On Thu, Feb 16, 2012 at 07:29:23PM +0000, Sian Mountbatten wrote:
> Incidentally, I am using the programming language Algol 68 to
> interface with the Xforms library. I have implemented an Algol
> 68 binding for the library which means that Algol 68 programs
> do not use forms.h. I also use a literate programming system
> which is especially adapted for Algol 68. It is called Web 68
> and is also on my web-site.

That sounds very interesting! Would you mind if I would put
a link onto the XForms documentation and the web site about
that? And if I do so, where should that link point to? It
took me a bit of time finding the sources. Would you per-
haps be prepared to create some page with a description
(containing what else might be needed - I've never used
Algol, and there seems to be a dependency on "Web68" which
I also don't know about) and links to what needs to be down-
loaded that I could refer to?
0 new messages