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 » 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? and How can I?

thanks.

User avatar
doublemax
Moderator
Moderator
Posts: 14075
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDataViewCtrl issues under mac os

Post by doublemax » Mon May 20, 2019 5:13 am

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 » Mon May 20, 2019 5:53 am

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: 3464
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDataViewCtrl issues under mac os

Post by ONEEYEMAN » Mon May 20, 2019 2:29 pm

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: 14075
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDataViewCtrl issues under mac os

Post by doublemax » Mon May 20, 2019 3:17 pm

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
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 698
Joined: Mon Apr 30, 2012 11:07 pm

Re: wxDataViewCtrl issues under mac os

Post by Manolo » 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

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 » Thu May 23, 2019 11:56 am

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