const wxValidator& validator,
const wxString& name)
{
- DontCreatePeer();
-
- m_marginX =
- m_marginY = 0;
-
// FIXME: this hack is needed because we're called from
// wxBitmapButton::Create() with this style and we currently use a
// different wxWidgetImpl method (CreateBitmapButton() rather than
// CreateButton()) for creating bitmap buttons, but we really ought
// to unify the creation of buttons of all kinds and then remove
// this check
- if ( style & wxBU_NOTEXT )
+ if ( style & wxBU_NOTEXT && !ShouldCreatePeer() )
{
return wxControl::Create(parent, id, pos, size, style,
validator, name);
}
+ DontCreatePeer();
+
+ m_marginX =
+ m_marginY = 0;
+
wxString label;
// Ignore the standard label for help buttons if possible, they use "?"
bool wxButton::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
- wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId);
+ wxCommandEvent event(wxEVT_BUTTON, m_windowId);
event.SetEventObject(this);
ProcessCommand(event);
return true;
bool wxDisclosureTriangle::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
// Just emit button event for now
- wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId);
+ wxCommandEvent event(wxEVT_BUTTON, m_windowId);
event.SetEventObject(this);
ProcessCommand(event);