@@ -650,7 +650,7 @@ class TextBox(AxesWidget):
650
650
"""
651
651
652
652
def __init__ (self , ax , label , initial = '' ,
653
- color = '.95' , hovercolor = '1' ):
653
+ color = '.95' , hovercolor = '1' , label_pad = .01 ):
654
654
"""
655
655
Parameters
656
656
----------
@@ -669,6 +669,9 @@ def __init__(self, ax, label, initial='',
669
669
670
670
hovercolor : color
671
671
The color of the box when the mouse is over it
672
+
673
+ label_pad : float
674
+ the distance between the label and the right side of the textbox
672
675
"""
673
676
AxesWidget .__init__ (self , ax )
674
677
@@ -680,7 +683,7 @@ def __init__(self, ax, label, initial='',
680
683
self .params_to_disable += [key ]
681
684
682
685
self .text = initial
683
- self .label = ax .text (- 0.01 , 0.5 , label ,
686
+ self .label = ax .text (- label_pad , 0.5 , label ,
684
687
verticalalignment = 'center' ,
685
688
horizontalalignment = 'right' ,
686
689
transform = ax .transAxes )
@@ -810,7 +813,6 @@ def begin_typing(self, x):
810
813
rcParams [key ] = []
811
814
#now, we have to figure out where the cursor goes.
812
815
#approximate it based on assuming all characters the same length
813
- print (x )
814
816
self .cursor_index = len (self .text )
815
817
self ._rendercursor ()
816
818
0 commit comments