Kirix Support Forums

aui draw bug ?

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

aui draw bug ?

Postby geoionescu on Tue Feb 13, 2007 1:09 am

Hello dear Benjamin,

Regarding my previous post, in which I mentioned a problem with adding a control to a toolbar and not getting the right size (e.g. the toolbar was smaller in width than it should), I managed to do it by manually specifying the toolbar's best size, something like

Code: Select all
wxToolBar* tbStandard = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER);

// wxZoomCombo is a combo derived from wxOwnerDrawnComboBox
wxZoomCombo* pCmbZoom = new wxZoomCombo(tbStandard, wxID_CMB_ZOOM, wxSize(this->GetCharWidth()*10,wxDefaultCoord), this);

tbStandard->CacheBestSize(wxSize( tbStandard->GetBestSize().x + pCmbZoom->GetSize().GetWidth(), tbStandard->GetBestSize().y - 1 ));

That did the trick, but I'm now experiencing something which looks like a drawing bug:


I'm using latest wxWidgets (e.g. 2.8.0) but I've also checked CVS and I couldn't find any significant code changes which address this issue.

Any ideas?

Editing this message later...

I don't know whether this was my mistake or not (I guess it was). Calling
Code: Select all

did the trick and the bug disappeared.

I shouldn't have posted the original message, but I struggled with this for almost an hour.

Thanks again.
Registered User
Posts: 4
Joined: Sun Oct 15, 2006 3:50 am

Return to wxAUI Questions, Thoughts & Feedback