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