lmi
[Top][All Lists]
Advanced

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

Re: [lmi] F2 in wxGrid checkbox cell


From: Greg Chicares
Subject: Re: [lmi] F2 in wxGrid checkbox cell
Date: Thu, 16 Jul 2020 10:31:26 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

On 2020-07-15 21:25, Vadim Zeitlin wrote:
> On Wed, 15 Jul 2020 18:29:23 +0000 Greg Chicares <gchicares@sbcglobal.net> 
> wrote:
> 
> GC> What should happen if I press F2 when a wxGrid checkbox cell is selected?

We've been able to think of only two reasonable options:
toggle the value (current behavior), or do nothing.

>  FWIW wxGrid previously "started editing" the boolean cells when F2 was
> pressed too, but this was definitely surprising, as the cell being edited
> had the same appearance as the cell not being edited, except for the lack
> of focus rectangle. And it was especially bad for ending editing, because
> you had to "accept" the changes by pressing Enter (or Tab) or clicking
> outside the cell, but it was easy to forget to do it because there was no
> visual clue that the cell was being edited.

Is there some relatively easy way we could experiment
with both behaviors, e.g., by applying some small
patch and rebuilding wx? I ask because it's often
easier to evaluate alternative behaviors by playing
with both. One idea would be a throwaway patch that
leaves the F2 behavior as is, and maps F3 to the
previous wxGrid behavior you describe above.

> I've experimented with ending
> editing automatically as soon as the value changed, which was better, but
> didn't work well if you started editing with the Space, which showed the
> checkbox control, toggled it, and then immediately hid, resulting in
> "something" happening but it wasn't clear what.

BTW, that sounds weird to me, for a different reason:
other controls (comboboxes, for instance) that ask
the user to make a choice do not end editing as soon
as a choice is made.

But it's interesting that you mention pressing Space
to begin editing. We discussed this already:
  https://lists.nongnu.org/archive/html/lmi/2020-06/msg00033.html
and concluded that for a text-edit grid cell, Space
should do what it does now in wxGrid (that is, delete
contents and enter edit mode) because that's what it
would do in a spreadsheet program. In light of that,
it seems natural and obvious that pressing Space
should toggle the state of a textbox grid cell.

Yet this leads me down a new line of inquiry...

 - Should Space be a synonym for F2? If so, then Space
naturally toggles a checkbox, and it would follow that
F2 should do the same. But the initial premise fails:
we already decided, correctly, that normal spreadsheet
behavior is expected, and therefore Space and F2 must
do different things in a text-edit cell.

 - Then why do we even ask what Space should do?
Does the question occur to us only because Space is
a way to enter "edit mode" in wxDvc? Or is it merely
because Space exists, and pressing it must map to
some behavior?

 - Might end users think of Space as the census
manager's begin-editing key, because of previous
experience with the wxDVC implementation? Or would
they have used F2 for that purpose, as I did because
of my experience with disco-era spreadsheet programs?
Or, these being modern times, would they avoid the
keyboard and just use the mouse or tap the screen, in
which case we don't need to worry about what F2 does?
(I suppose we'll have to ask them.)

> So I've finally implemented
> the current solution which never shows the editor (i.e. the actual
> wxCheckBox control) at all, as it just seems to work best in practice. And
> it also happens to work in the same way as in wxDVC, so should be familiar
> to the users of the existing lmi version.

Comparing the wxDVC and wxGrid census managers,
when a checkbox cell is selected: Space does the
same thing in both, but F2 behaves differently,
which might surprise users accustomed to the
old behavior. Again, we'll want to consult them.


reply via email to

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