@@ -1109,7 +1109,7 @@ def _set_frame_icon(frame):
1109
1109
1110
1110
1111
1111
class NavigationToolbar2Wx (NavigationToolbar2 , wx .ToolBar ):
1112
- def __init__ (self , canvas ):
1112
+ def __init__ (self , canvas , coordinates = True ):
1113
1113
wx .ToolBar .__init__ (self , canvas .GetParent (), - 1 )
1114
1114
1115
1115
if 'wxMac' in wx .PlatformInfo :
@@ -1131,9 +1131,11 @@ def __init__(self, canvas):
1131
1131
self .Bind (wx .EVT_TOOL , getattr (self , callback ),
1132
1132
id = self .wx_ids [text ])
1133
1133
1134
- self .AddStretchableSpace ()
1135
- self ._label_text = wx .StaticText (self )
1136
- self .AddControl (self ._label_text )
1134
+ self ._coordinates = coordinates
1135
+ if self ._coordinates :
1136
+ self .AddStretchableSpace ()
1137
+ self ._label_text = wx .StaticText (self )
1138
+ self .AddControl (self ._label_text )
1137
1139
1138
1140
self .Realize ()
1139
1141
@@ -1338,7 +1340,8 @@ def statbar(self):
1338
1340
return self .GetTopLevelParent ().GetStatusBar ()
1339
1341
1340
1342
def set_message (self , s ):
1341
- self ._label_text .SetLabel (s )
1343
+ if self ._coordinates :
1344
+ self ._label_text .SetLabel (s )
1342
1345
1343
1346
def set_history_buttons (self ):
1344
1347
can_backward = self ._nav_stack ._pos > 0
0 commit comments