[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Movement of widgets on a form when resized

From: Jens Thoms Toerring
Subject: Re: [XForms] Movement of widgets on a form when resized
Date: Thu, 16 Feb 2012 13:45:37 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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

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


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  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]