lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Allow opening cell editor with double-click


From: Václav Slavík
Subject: Re: [lmi] Allow opening cell editor with double-click
Date: Fri, 6 Jan 2012 17:13:26 +0100

Hi,

On 6 Jan 2012, at 12:39, Greg Chicares wrote:
> On 2012-01-05 15:37Z, Vadim Zeitlin wrote:
>> On Thu, 05 Jan 2012 13:31:15 +0000 Greg Chicares <address@hidden> wrote:
>> 
>> GC> I agree that Enter should do the same thing as double-click. But it
>> GC> seems weird that Spacebar does anything; could we prevent if from
>> GC> having any effect, at least in lmi?
>> 
>> The trouble is that this is really the only other standard key for doing
>> this. We discussed it already with Vaclav and neither of us could really
>> come with any good alternative. So if we don't use Space, what do we use?
> 
> I've suggested Alt-Enter. Ctrl-Enter would be as good.

Neither of these is a good choice for general-purpose widget such as wxDVC: 
they are neither discoverable nor commonly used for this or similar purpose (or 
are they?).

Space, on the other hand, is already used for this very purpose on some 
platforms (GTK+), so allowing it is not unheard of — and I think it's a plus if 
the control behaves similarly on all platforms, if it doesn't go against the 
platform's native behavior. Space is also used to toggle checkboxes, so it's 
not a bad choice from that point of view either. And it's one of the few 
"major" keys — Enter, Space, Esc — that are used for all sorts of things 
everywhere. That was the reasoning behind supporting the use of all of Enter, 
Space, F2: wxDVC is not native on Windows, so we should try hard to make it 
work for people with different habits. 

> I'm likely to use it for its customary purpose when in editing mode,
> so it's confusing to use it as a mode switch. A toggle is preferable
> to a unidirectional switch because it does the same thing regardless
> of the current mode context, but Spacebar cannot be a toggle--it can't
> exit editing mode because it's needed to type spaces.

Note that the situation is not symmetrical anyway. There's only one way of 
entering the inline editing mode but two ways of leaving it: commit or cancel.

So only Enter ("commit the edit") would satisfy this requirement. And Enter can 
indeed be used to enter editing mode and is what I usually prefer. The problem 
here is that it is overloaded and is used to activate the item too — which is 
in line with Windows native UI expectations.

So perhaps it would be best to disable Enter-to-activate in LMI and use only 
Ctrl+E or double-clicking the row to enter the editor, but not Enter? (This 
would still leave Space active, but is it really a problem when Space triggers 
editing *in addition* to F2/Enter, when it would be noop otherwise?)

We could also change the priorities in wxDVC itself ("when Enter is pressed, 
try inline editing first and only activate later" and not the other way around 
as now), but I have a feeling that it wouldn't be a good idea.

Regards,
Vaclav

reply via email to

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