Getting (maximal) size of wxToolbook
Volker Bartheld
dr_versaeg at freenet.de
Tue Sep 25 09:57:28 PDT 2007
Hi!
Strange that my post didn't show up in groups.google.com... I allow myself
to quote it in an abbreviated form - in case that the original post got
lost during transmission. Please apologize if you recieved it twice.
Volker
On Tue, 25 Sep 2007 11:49:26 +0200, Volker Bartheld wrote:
> I want to put a wxToolbook into a nonresizeable frame. The toolbook
> consists of, say, seven pages (=panels) that have a smaller height than
> the toolbook buttons that are arranged with the wxNB_LEFT style. The frame
> should have such an initial size that it can display all toolbook-buttons
> without truncating them or the need for a resize plus all panels at their
> full minimal size.
>
> The latter I can archieve by iterating all panels and determining the largest
> coordinates returned by individual wxPanel->GetMinSize() calls.
>
> Unfortunately, I failed in querying the wxToolbook for its size that *included*
> the extent of the toolbook buttons. In case of the sample code below [1], on
> my wxMSW2.8.4 setup,
>
> s0=pMyTestPanel->GetSize(), // 248,138
> s1=pMyTestPanel->GetMinSize(), // 248,138
> s2=pMyTestPanel->GetMaxSize(), // -1,-1
> s3=m_pToolbook->GetSize(), // 292,138
> s4=m_pToolbook->GetMinSize(), // -1,-1
> s5=m_pToolbook->GetMaxSize(); // -1,-1
>
> was returned which clearly didn't include the buttons (height approx
> 7x50=350).
>
> How can I solve this issue?
[1] See Message-ID: <3yrtmt9v2usl.iwi8z1hfl8gj$.dlg at 40tude.net>
--
mailto: V B A R T H E L D at G M X dot D E
More information about the wx-users
mailing list