Re: [Tk] grab mouse for one click



Dnia 04 Nov 2005 14:52:34 GMT, Andreas Leitgeb skrobie:
> Sektor van Skijlen <ethouris@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > This operation needs yet another "item" to perform this operation. So when I
> > click this button, the application should request the user to click on the
> > listbox in order to select the second "argument" for this operation, then
> > return to the normal work.

> By grabbing the mouse to the listbox, you might prevent the
> user from scrolling in his intended item, if it is not
> currently visible, because the scrollbar is a different widget.

Yes, that's correct. Despite I can scroll by mouse wheel, clicking the
scrollbar causes that... some item has been selected.

> You can set a special flag when user clicks first item,
> then ask him (e.g. through a label in the status-bar) to
> select argument item,

That's obvious ;)

> and in the normal click-handler
> you recognize the previously set flag, and handle the
> new click as an "argument-click".

Hmm... the local state?
Sounds good ;)

> Of course there should be ways to reset that flag through
> some cancel-feature,

Yes.

"Please select destination branch (Esc to cancel)"

> and furthermore a way to correct a
> wrong (mis-targetted click). This is necessary, since often
> a user has to click into the listbox first, just to set the
> focus on it and to be able to scroll it with mouse-wheel or
> cursor-keys, and only then he'll scroll to right position
> and then click what he really wanted to click.

After it is selected there will be displayed some modal window, which will
show the user's selection to confirm and maybe with additional options.

Ok, I'll precise: this is a small tool for ClearCase. It has to provide two
capabilities the ClearCase (sucking!) GUIs lack: delete multiple versions and
merging versions with also possible selection of the base version for the
source version. So after the user clicks the destination version he will be
asked for confirmation and also possible selection of the base version (again
one click).

Looxlike also I would have to provide it as a generic facility to make it
possible to perform a "requested click".

> Acting on the first click in the listbox is very user-unfriendly.

However I expect problems. When I request selection, the user should be not
able to, for example, click another button, exit the application (although it
wouldn't be harmful) and other such things (this application does not have any
menu, but only buttons; however if it had, the menu should be disabled as
well).

--
// _ ___ Michal "Sektor" Malecki <sektor(whirl)kis.p.lodz.pl>
\\ L_ |/ `| /^\ ,() <ethourhs(O)wp.pl>
// \_ |\ \/ \_/ /\ C++ bez cholesterolu: http://www.intercon.pl/~sektor/cbx
"I am allergic to Java because programming in Java reminds me casting spells"
.


Loading