[wx-dev] Query about wxDataViewCtrl
Belgabor
belgabor at gmx.de
Tue Feb 26 15:43:05 PST 2008
Robert Roebling schrieb:
> Belgabor wrote:
>
>> after having to work around some of the shortcomings of wxDataViewCtrl
>> (generic implementation) in the 2.8 codebase, I now looked at the
>> changes in trunk. I have to say I'm pretty impressed. Still there are a
>> few things I need that seem to be still unimplemented. Therefore before
>> starting to work on the control itself I wanted to inquire whether
>> patches about those things would be appreciated.
>
> Yes!
>
>> Before (on 2.8) I
>> hacked around on my own, but now I'd prefer to get the functionality I
>> need into the core lib. Here's what I need/want to implement:
>>
>> - Working right-click
>
> I assume you mean for context menus? The idea is to emit a
> context menu event after right clicking and I actually forgot
> if this has been implemented in the generic code already.
Unfortunately no, it's not implemented. My idea was to react to RightUp
and call cell->RightClick. If that returns false, the control sends an
CONTEXT event.
>
>> - Single-click cell activation and/or
>
> Not sure what you mean here. In-place editing already works.
Yeah. That request was partly influenced by the use case of the first
data view control I used. The focus was less on viewing but more on
editing. I'm not sure anymore why I chose to implement it via Activate,
but maybe I had some problems with the normal edit mode. I remember
faintly that the generic data view control I started from had severe
display artifacts, so I basically wrote all renderers myself and kinda
did it how I thought it should be done (I'm also not sure if the
EditorCtrl functions were already there at that stage). So users asked
me if I could ease up editing by going into edit mode with a single
rather than a double-click. In fact for some columns I bypassed "edit
mode"/activate completely and cycle the value directly between allowed
options on a single click (which I then implemented via LeftClick).
>
>> - Drag'n'drop (although that might be too complex for me to solve)
>
> I'm theoretically working on an API for this, but have not time..
I can understand that. It's currently not really high on my priority
list, but I might look into it later.
>
>> - Probably some other things that crop up later.
>>
>> Let me know what you guys think.
>
> Any input is welcome,
Great to hear, I'll keep you updated.
Cheers,
Tobias
More information about the wx-dev
mailing list