Search code examples
perlwxwidgets

Getting height of a wxWidgets panel which is not fully visible


I use wxWidgets and implement scrollbars in my simple application, and for correct scrollbar initialization I need to know the total height of widgets inside the scrolled area.

I'm unable get the correct height of widgets which are not completely visible.

Is there some way to get the height of theses hidden items?

image from imgur.com


Solution

  • GetSize() method returned correct dimensions. Problem was using wxScrolledWindow class, because "panels" inside wxScrolledWindow only had dimensions such as the dimension of visible part of the wxScrolleWindow. Thus, method GetSize() seemed to be returning wrong height. Complete solution of this problem is desribed here Resize a wxNotebook when content sizes changed