diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm index f38947d96f..94028be063 100644 --- a/src/osx/cocoa/button.mm +++ b/src/osx/cocoa/button.mm @@ -37,6 +37,18 @@ } } +- (id) initWithFrame:(NSRect) frame +{ + self = [super initWithFrame:frame]; + + // NSButton uses "Button" as its title by default which is inconvenient as + // wxWidgets expects the control to not have any default label, so reset it + // here to resolve this mismatch. + [self setTitle:@""]; + + return self; +} + - (int) intValue { switch ( [self state] )