@@ -1105,7 +1105,7 @@ def _set_frame_icon(frame):
1105
1105
1106
1106
1107
1107
class NavigationToolbar2Wx (NavigationToolbar2 , wx .ToolBar ):
1108
- def __init__ (self , canvas ):
1108
+ def __init__ (self , canvas , coordinates = True ):
1109
1109
wx .ToolBar .__init__ (self , canvas .GetParent (), - 1 )
1110
1110
1111
1111
if 'wxMac' in wx .PlatformInfo :
@@ -1127,9 +1127,11 @@ def __init__(self, canvas):
1127
1127
self .Bind (wx .EVT_TOOL , getattr (self , callback ),
1128
1128
id = self .wx_ids [text ])
1129
1129
1130
- self .AddStretchableSpace ()
1131
- self ._label_text = wx .StaticText (self )
1132
- self .AddControl (self ._label_text )
1130
+ self ._coordinates = coordinates
1131
+ if self ._coordinates :
1132
+ self .AddStretchableSpace ()
1133
+ self ._label_text = wx .StaticText (self )
1134
+ self .AddControl (self ._label_text )
1133
1135
1134
1136
self .Realize ()
1135
1137
@@ -1334,7 +1336,8 @@ def statbar(self):
1334
1336
return self .GetTopLevelParent ().GetStatusBar ()
1335
1337
1336
1338
def set_message (self , s ):
1337
- self ._label_text .SetLabel (s )
1339
+ if self ._coordinates :
1340
+ self ._label_text .SetLabel (s )
1338
1341
1339
1342
def set_history_buttons (self ):
1340
1343
can_backward = self ._nav_stack ._pos > 0
0 commit comments