コード例 #1
0
 def __init__(self, orientation='left', **kwargs):
     if 'tick_direction' not in kwargs:
         tickdir = {'left': (-1, 0), 'right': (1, 0), 'bottom': (0, 1),
                    'top': (0, -1)}[orientation]
         kwargs['tick_direction'] = tickdir
     self.axis = ExtAxisVisual(**kwargs)
     self.orientation = orientation
     self._linked_view = None
     Widget.__init__(self)
     self.add_subvisual(self.axis)		
コード例 #2
0
    def _create_label(self):
        """
        Creates the label.
        """

        self._label = Label(str(), color=(0.8, 0.8, 0.8))
        self._label.stretch = (1, 0.1)
        self._grid = self.add_grid(margin=16)
        self._grid.add_widget(self._label, row=0, col=0)
        self._grid.add_widget(Widget(), row=1, col=0)

        self._label_text()