Re: wxBitmapBundle and wxAuiToolbar, buttons are too large.

Vadim Zeitlin <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On Wed, 11 Dec 2024 05:20:57 -0800 (PST) Tony Kennedy wrote:

TK> When the wxAuiToolbar is create, the icon is now massive. And even if I use 
TK> the following to create a smaller bitmap, the toolbar icon is still massive.
TK> m_toolBar->SetToolBitmapSize( wxSize(10,10)  );
TK> wxBitmap smallBitmap = myBundle.GetBitmap(wxSize(10,10)));
TK> m_toolBar->AddTool(ID_RICHTEXT_EDITOR, "test", smallBitmap, "test");
TK> 
TK> Am I doing something wrong? I understand that the bitmap bundle should be 
TK> the right size for the toolbar.

 You should pass "myBundle" directly to AddTool(), the whole point is that
the toolbar will ask it for the bitmap of the correct size itself.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
              https://www.tt-solutions.com/
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQQx+vLQdOwioQqkxtoG6kHeT2wehgUCZ1nEMgAKCRAG6kHeT2we
huGJAJ49pMMItpPlGfApT59EBHMQ+NAQqACeNXq61SktyLw2BiHnj2VXZ0JyUO0=
=5jhZ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.