wxDataViewChoiceRenderer column in the wxDataViewCtrl under MSW

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

wxDataViewChoiceRenderer column in the wxDataViewCtrl under MSW

Oleksandra Iushchenko
Hi, guys!

I have a question about editing of the wxDataViewChoiceRenderer column under MSW.

Does anybody know why the editing start on second (sometimes third) click on cell.
Is it a regular behavior of these cells? You can run standard sample with wxDataViewCtrl to test it.

But I would like to start editing this cell instantly after selecting. 
How can I fix
 it

Kind regard, Alexandra

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewChoiceRenderer column in the wxDataViewCtrl under MSW

oneeyeman
Hi, Oleksandra,

On Tue, Dec 4, 2018 at 8:35 AM Oleksandra Iushchenko <[hidden email]> wrote:

>
> Hi, guys!
>
> I have a question about editing of the wxDataViewChoiceRenderer column under MSW.
>
> Does anybody know why the editing start on second (sometimes third) click on cell.
> Is it a regular behavior of these cells? You can run standard sample with wxDataViewCtrl to test it.
>
> But I would like to start editing this cell instantly after selecting.
> How can I fix it?

It is probably intentional - the first click selects the cell and then
you second click starts editing.
It is the same for the wxGrid and it is probably the behavior of the
native control under GTK/OSX.

You can try to call EditItem() in responce to the first click on the
cell. Probably in responce to
EVT_DATAVIEW_SELECTION_CHANGED event. Or maybe to mouse click one.

Thank you.

>
> Kind regard, Alexandra
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewChoiceRenderer column in the wxDataViewCtrl under MSW

Oleksandra Iushchenko
Hello, Igor. 

Thanks a lot for your reply. 

Actually, it was my first idea. But it doesn't work. 
In this case new ComboBox  is created but never deleted. As a result, when cell is unselected, ComboBox stay in the cell forever. 

Kind regard, Alexandra

вівторок, 4 грудня 2018 р. 17:04:18 UTC+1 користувач Igor Korot написав:
Hi, Oleksandra,

On Tue, Dec 4, 2018 at 8:35 AM Oleksandra Iushchenko <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="55SxV3BSBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">yus...@...> wrote:

>
> Hi, guys!
>
> I have a question about editing of the wxDataViewChoiceRenderer column under MSW.
>
> Does anybody know why the editing start on second (sometimes third) click on cell.
> Is it a regular behavior of these cells? You can run standard sample with wxDataViewCtrl to test it.
>
> But I would like to start editing this cell instantly after selecting.
> How can I fix it?

It is probably intentional - the first click selects the cell and then
you second click starts editing.
It is the same for the wxGrid and it is probably the behavior of the
native control under GTK/OSX.

You can try to call EditItem() in responce to the first click on the
cell. Probably in responce to
EVT_DATAVIEW_SELECTION_CHANGED event. Or maybe to mouse click one.

Thank you.

>
> Kind regard, Alexandra
>
> --
> Please read <a href="http://www.wxwidgets.org/support/mlhowto.htm" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.wxwidgets.org%2Fsupport%2Fmlhowto.htm\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGeLI38cNrlq2cC-jNsMzVrvhdIVA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.wxwidgets.org%2Fsupport%2Fmlhowto.htm\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGeLI38cNrlq2cC-jNsMzVrvhdIVA&#39;;return true;">http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="55SxV3BSBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">wx-users+u...@googlegroups.com
> or visit <a href="http://groups.google.com/group/wx-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/wx-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/wx-users&#39;;return true;">http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewChoiceRenderer column in the wxDataViewCtrl under MSW

Vadim Zeitlin-4
In reply to this post by Oleksandra Iushchenko
On Tue, 4 Dec 2018 06:35:41 -0800 (PST) Oleksandra Iushchenko wrote:

OI> I have a question about editing of the wxDataViewChoiceRenderer column
OI> under MSW.
OI>
OI> Does anybody know why the editing start on second (sometimes third) click
OI> on cell.
OI> Is it a regular behavior of these cells? You can run standard sample with
OI> wxDataViewCtrl to test it.

 Yes, this is the expected/desired behaviour. You can check that Windows
explorer works in the same way, for example.

OI> But I would like to start editing this cell instantly after selecting.

 First of all, I don't advise doing it, starting editing on selection will
be very surprising. At the very least, use a time, but even then I'm not
sure how much your users would appreciate it. But if you absolutely want to
do it like this, calling EditItem() should work. Whichever problem you're
observing when using it needs to be discussed and possibly debugged
separately, but calling EditItem() shouldn't leave the old editor shown, of
course.

 Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/

attachment0 (203 bytes) Download Attachment