lmi
[Top][All Lists]
Advanced

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

Re: [lmi] switch census view to use wxDataViewCtrl


From: Václav Slavík
Subject: Re: [lmi] switch census view to use wxDataViewCtrl
Date: Wed, 3 Aug 2011 21:18:03 +0200

Hi,

On 3 Aug 2011, at 21:07, Greg Chicares wrote:
> Okay, you have persuaded me to change my opinion thus:
>  if the control enters the zero-rows-selected state through deliberate user
>    action, then commands that require a selection become unavailable
> and that's sufficient to honor the native behavior. But I still balk at
> letting the control enter that state without deliberate user action, so I
> propose that we select some row programmatically both when the control is
> created, and when selected rows are deleted. Does that feel okay to you?

Yes, certainly, that's what I meant, but only mentioned the Delete cells case 
-- sorry for not being clear. 

> Yes, except in the important case where the census has exactly one row.
> For example:
>  File | New | Census
> None of the arrow keys cause the row to be selected. With the old listview
> implementation and wx-2.9.0, any of the four arrow keys selected it. Is
> that a deliberate difference between wxLV and wxDVC, or do you see it as a
> wxDVC anomaly that should be changed in a future wx release?

I think wxDVC should behave identically to wxLV in this case. Moreoever, I 
think it's a bug to create CensusView without selection, and the latter is more 
serious (we wouldn't even notice the former if it weren't for the latter).
> 
> (I know now that Home, End, PgUp, and PgDn act the way I expect the arrow
> keys to in the above example, but my habit is to use the arrow keys, and
> I was surprised that they didn't work.)
> 
> If you want to make wxDVC's behavior more similar to wxLV's, then let me
> suggest removing the focus rectangle that surrounds the first item upon
> creation--for wxDVC but not for wxLV.

I agree. If a wxDVC control is created without selection, it shouldn't have 
visible focus either, consistently with wxLV.

> If you have rows representing all uppercase ASCII letters, and you delete B 
> and F,
> then the selection could be set to A or C, or E or G; I don't think it matters
> which of those we choose. (Of course, if A and Z are deleted, we'd have to 
> pick
> either B or Y.)

I was only thinking about the continuous case myself. Ideally, in the general 
case, the new selection should be at the place where keyboard focus or mouse 
cursor is.

Regards,
Vaclav


reply via email to

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