Page 1 of 1

wxDataViewCtrl issues under mac os

Posted: Mon May 20, 2019 1:38 am
by icryrainix
I found wxDataViewCtrl just inherited from wxDataViewCtrlBase under Mac OSX, but under Windows, it is inherited from wxDataViewCtrlBase and wxScrollHelper, I am wondering, is it possible to make wxDataViewCtrl inherited from wxDataViewCtrlBase and wxScrollHelper under Mac OSX, same as Windows? and How can I?

thanks.

Re: wxDataViewCtrl issues under mac os

Posted: Mon May 20, 2019 5:13 am
by doublemax
icryrainix wrote: Mon May 20, 2019 1:38 am I found wxDataViewCtrl just inherited from wxDataViewCtrlBase under Mac OSX, but under Windows, it is inherited from wxDataViewCtrlBase and wxScrollHelper, I am wondering, is it possible to make wxDataViewCtrl inherited from wxDataViewCtrlBase and wxScrollHelper under Mac OSX, same as Windows?
No. wxDataViewCtrl under OSX is a wrapper around a native control. Windows doesn't have a native control for that purpose, so wxWidgets uses a generic implementation there.

Why do you want that, what are you trying to do?

Re: wxDataViewCtrl issues under mac os

Posted: Mon May 20, 2019 5:53 am
by icryrainix
I want to hide scrollbar of wxDataViewCtrl under mac os, under windows platform, I can use showscrollbars() to hide it, but under mac os, how can I do it?
Thank you very much for your help.

Re: wxDataViewCtrl issues under mac os

Posted: Mon May 20, 2019 2:29 pm
by ONEEYEMAN
Hi,
You can try to call SetSize() on it.
How to calculate the proper size is a different issue though...

Thank you.

Re: wxDataViewCtrl issues under mac os

Posted: Mon May 20, 2019 3:17 pm
by doublemax
I don't think that's possible with the native control. But if you don't want scrollbars, you probably only have a fixed, small number of items to display. Does wxGrid work for your purpose? It's a generic control, so you have more control over it,

Re: wxDataViewCtrl issues under mac os

Posted: Mon May 20, 2019 6:17 pm
by Manolo
As a last resource, you can use the generic version instead of the native one.

For this, use two "define" and rebuild wxWidgets. See viewtopic.php?t=41995#p169933

Re: wxDataViewCtrl issues under mac os

Posted: Thu May 23, 2019 11:56 am
by icryrainix
Manolo wrote: Mon May 20, 2019 6:17 pm As a last resource, you can use the generic version instead of the native one.

For this, use two "define" and rebuild wxWidgets. See viewtopic.php?t=41995#p169933
Yes, it is done, thanks.