wxDataViewCtrl issues under mac os

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
icryrainix
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon May 20, 2019 1:31 am

wxDataViewCtrl issues under mac os

Post 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.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDataViewCtrl issues under mac os

Post 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?
Use the source, Luke!
icryrainix
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon May 20, 2019 1:31 am

Re: wxDataViewCtrl issues under mac os

Post 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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDataViewCtrl issues under mac os

Post by ONEEYEMAN »

Hi,
You can try to call SetSize() on it.
How to calculate the proper size is a different issue though...

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDataViewCtrl issues under mac os

Post 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,
Use the source, Luke!
Manolo
Can't get richer than this
Can't get richer than this
Posts: 828
Joined: Mon Apr 30, 2012 11:07 pm

Re: wxDataViewCtrl issues under mac os

Post 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
icryrainix
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon May 20, 2019 1:31 am

Re: wxDataViewCtrl issues under mac os

Post 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.
Post Reply