return false;
m_labelOrig = m_label = label ;
-
+
m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
m_peer = wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() );
MacPostControlCreate( pos, size );
- // passing the text in the param doesn't seem to work, so lets do if again
+ // passing the text in the param doesn't seem to work, so lets do it again
SetLabel( label );
-
+
return true;
}
wxSize wxDisclosureTriangle::DoGetBestSize() const
{
- return wxSize(16,16);
+ wxSize size = wxWindow::DoGetBestSize();
+
+ // under Carbon the base class GetBestSize() implementation doesn't seem to
+ // take the label into account at all, correct for it here
+#if wxOSX_USE_CARBON
+ size.x += GetTextExtent(GetLabel()).x;
+#endif // wxOSX_USE_CARBON
+
+ return size;
}