[wx-dev] fix in wxToolbar (tbar95.cpp)
Armel Asselin
asselin.armel at wanadoo.fr
Fri Nov 24 09:42:39 PST 2006
> On Mon, 23 Oct 2006 22:39:18 +0200 Armel Asselin =
> <asselin.armel at wanadoo.fr> wrote:
>
> AA> i've been having problems with wxToolbar and controls.
> AA> Finally, i digged inside the code and it seems that TB_SETBUTTONINFO =
> really
> AA> has the wanted effects wrt to the items widths only since common =
> controls
> AA> 6.00 (with 5.81 it does not really work, it does not fail either)
>
> To return to this old topic, could you please add a test for this bug to
> the sample? Then I could at least test it on more systems here (of course,
> it would be great if you could do it yourself but if not I have a couple =
> of
> VMs with different comctl32.dll versions here) and determine if it doesn't
> work for just 5.81 or for 4.71 and 5.0 as well. I'm reluctant to =
> generalize
> the dummy separators hack as this has issues as well.
>
> Thanks,
> VZ
you can just put this text:
// once we rebuilt the toolbar we ouput some stuff to the main text field
m_textWindow->AppendText (wxString::Format(wxT("toolbar best size: =
%d,%d\n"),
toolBar->GetBestSize().GetWidth(), toolBar->GetBestSize().GetHeight()));
near line samples/toolbar/toolbar.cpp:456 near
toolBar->Realize();
toolBar->SetRows(m_horzToolbar ? m_rows : 10 / m_rows);
It will print the best size in the main view, and it will show smaller =
values on failing comctl32.dll
Note, that the patch that I sent previously was partial and had a bug: ther=
e =
several tests for comctl32.dll version directly written as version >=3D 471 =
(or similar). And I initialy fixed only one, the other would crash the app. =
I put here a new one (against 2.6.3, it is a 10 line patch so it should be =
easy to put in 2.8)
Armel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tbar95.oldcomctl.patch
Type: application/octet-stream
Size: 1222 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20061124/cc4b=
9160/tbar95.oldcomctl.obj
More information about the wx-dev
mailing list