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

[XForms] Single and double-click

0 views
Skip to first unread message

Sian Mountbatten

unread,
Feb 5, 2012, 3:36:29 PM2/5/12
to xforms-de...@nongnu.org
Dear All

I have a form which currently responds to single clicks of the mouse.
Unfortunately, it appears to be reacting to more than a single click
even though a single click is all that happens.

I should like to stop the from from reacting to single clicks for
three browsers on the form, and restrict it to double-clicks only.
Is there any way of doing this?

Any help would be much appreciated.
--
Sian Mountbatten
Algol 68 specialist

Jens Thoms Toerring

unread,
Feb 5, 2012, 6:56:53 PM2/5/12
to Development with and of XForms
Dear Sian,

On Sun, Feb 05, 2012 at 08:36:17PM +0000, Sian Mountbatten wrote:
> I have a form which currently responds to single clicks of the mouse.
> Unfortunately, it appears to be reacting to more than a single click
> even though a single click is all that happens.

Different types of objects may react rather differently to mouse
clicks (a form by itself doesn't do anything at all), so you need
to tell which specific type of object this is about.

> I should like to stop the from from reacting to single clicks for
> three browsers on the form, and restrict it to double-clicks only.
> Is there any way of doing this?

Three (FL_SELECT_BROWSER, FL_HOLD_BROWSER and FL_MULTI_BROWSER)
of the four browser types react to single mouse clicks with the
left mouse button, none of them to double clicks per default. If
you don't want a reaction to single but only double clicks I guess
that using a FL_NORMAL_BROWSER (which doesn't react to single
clicks) and installing a callback for double clicks, using the
fl_set_browser_dblclick_callback() function, should do the trick.
At least that's how it should work according to my current un-
derstanding of the documentation and the code but I did not do
any tests yet. Just don't expect any visual reactions to double
clicks you didn't program in yourself. If you want e.g. a line
to be highlighted in some way on a double click you will have
to take care of that yourself (since it's imposible to forsee
what people expect to happen on a double click into a browser).

Best regards, Jens
--
\ Jens Thoms Toerring ________ j...@toerring.de
\_______________________________ http://toerring.de

Alessandro Basili

unread,
Feb 6, 2012, 4:10:59 AM2/6/12
to j...@toerring.de, Development with and of XForms
Jens Thoms Toerring writes:

> Three (FL_SELECT_BROWSER, FL_HOLD_BROWSER and FL_MULTI_BROWSER)
> of the four browser types react to single mouse clicks with the
> left mouse button, none of them to double clicks per default. If
> you don't want a reaction to single but only double clicks I guess
> that using a FL_NORMAL_BROWSER (which doesn't react to single
> clicks) and installing a callback for double clicks, using the
> fl_set_browser_dblclick_callback() function, should do the trick.

We normally use a FL_HOLD_BROWSER type of browser in order to highlight the
single mouse action of the user and then a dblclick_callback to perform the
action we want. We found that an intermediate step would help focusing user
attention and helped him effectively use the browser.

IMHO the action should be clear depending on the layout of the GUI. If it's
a directory search browser the user would expect that the action would be
'opening' a file or a directory. Giving cues about what's next will enable
the user to use effectively the object and since the user may not know if he
needs a single click or a double, having a visual feedback on a single click
may help the user.

> At least that's how it should work according to my current un-
> derstanding of the documentation and the code but I did not do
> any tests yet.

We are extensively using browsers but unfortunately we are still using
version 1.0 Released on december 8, 2002! Plus a couple of minor
modifications which do affected browser behavior.
I do not know if browser behavior has changed since that release, but I
believe that the main principles behind still do apply.

> clicks you didn't program in yourself. If you want e.g. a line
> to be highlighted in some way on a double click you will have
> to take care of that yourself (since it's imposible to forsee
> what people expect to happen on a double click into a browser).
>

Using the FL_HOLD_BROWSER you'll get highlighting automatically, but you
still need a dblclick_callback to react on double clicks.

What I noticed is not effectively working is the reaction to wheel inputs
when there's a slide vertical bar. It seems the reaction is not as smooth as
one would expect but I must say I haven't spent a whole lot of time on that.

Al

Jens Thoms Toerring

unread,
Feb 6, 2012, 5:14:37 AM2/6/12
to xforms-de...@nongnu.org, Alessandro Basili
Hi all,

On Mon, Feb 06, 2012 at 09:10:48AM +0000, Alessandro Basili wrote:
> >At least that's how it should work according to my current un-
> >derstanding of the documentation and the code but I did not do
> >any tests yet.
>
> We are extensively using browsers but unfortunately we are still
> using version 1.0 Released on december 8, 2002! Plus a couple of
> minor modifications which do affected browser behavior.
> I do not know if browser behavior has changed since that release,
> but I believe that the main principles behind still do apply.

Quite a bit pf the browswe code was rewritten for newer versions
thus there still might lurk new bugs I introduced and therefore
my caution about "according to my understanding of the code",
i.e. it's supposed to work that way but I know quite well that
I'm not infallible;-)

> What I noticed is not effectively working is the reaction to wheel
> inputs when there's a slide vertical bar. It seems the reaction is
> not as smooth as one would expect but I must say I haven't spent a
> whole lot of time on that.

I hope that this is one of the things that are fixed in newer
versions.
0 new messages