wxPropertyGrid horizontal scrolling?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
macsinus
Earned a small fee
Earned a small fee
Posts: 16
Joined: Mon Feb 22, 2016 12:36 pm
Location: Leipzig, Germany

wxPropertyGrid horizontal scrolling?

Post by macsinus »

Is there any way to get wxPropertyGrid to allow horizontal scrolling in case of long property values?
Putting the wxPropertyGrid in a sizer in a wxScrolledWindow doesn't help.
Would be nice to have, but I can take "no" for an answer (Microsoft also don't do this in VS2017).
wxWidgets 3.1.0
Boost 1.65
VS 2017
Win 7
macsinus
Earned a small fee
Earned a small fee
Posts: 16
Joined: Mon Feb 22, 2016 12:36 pm
Location: Leipzig, Germany

Re: wxPropertyGrid horizontal scrolling?

Post by macsinus »

P.S. Vertical scrolling works fine.
wxWidgets 3.1.0
Boost 1.65
VS 2017
Win 7
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxPropertyGrid horizontal scrolling?

Post by doublemax »

With calling SetVirtualWidth(...) i was able to make a horizontal scrollbar appear, but the scrolled part is not redrawn. I don't know if this just was never tested, or if there is still something missing.

So i do believe it's possible somehow. It may be worth asking on the wx-users mailing list, maybe the original author of wxPropertyGrid, Jaakko Salli, is still around sometimes.
Use the source, Luke!
macsinus
Earned a small fee
Earned a small fee
Posts: 16
Joined: Mon Feb 22, 2016 12:36 pm
Location: Leipzig, Germany

Re: wxPropertyGrid horizontal scrolling?

Post by macsinus »

Thanks doublemax.
On further reflection I can imagine that this would be difficult to implement efficiently and intuitively - for either the whole grid (which could be large) or at least the displayed portion, the maximum (text) width of the properties would have to be found. In the latter case, the scaling of the scrollbar would vary depending on the longest displayed property - I'm not sure whether this might disturb the user, and it would have to be done upon every resize or scroll.
Maybe Jaakko Salli decided for good reasons not to implement this and I should let it be.
wxWidgets 3.1.0
Boost 1.65
VS 2017
Win 7
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxPropertyGrid horizontal scrolling?

Post by ONEEYEMAN »

Hi,
Maybe all you need is to put the wxPropertyGrid inside the wxScrolled<>?
I know it just a workaround, but it is better than nothing.

Thank you.
macsinus
Earned a small fee
Earned a small fee
Posts: 16
Joined: Mon Feb 22, 2016 12:36 pm
Location: Leipzig, Germany

Re: wxPropertyGrid horizontal scrolling?

Post by macsinus »

Hi ONEEYEMAN,
not sure what you mean.
As I wrote above, putting the wxPropertyGrid in a sizer in a wxScrolledWindow doesn't help.
wxWidgets 3.1.0
Boost 1.65
VS 2017
Win 7
Post Reply