def add_option_buttons(self):
     """
     Add additional buttons needed by this widget
     """
     self.append_option_button(
         IconButton(size_hint_x=0.15,
                    text=u'\uf0b2',
                    on_press=self.on_center_map))
 def add_option_buttons(self):
     '''
     Add additional buttons needed by this widget
     '''
     self.chart_mode_toggle_button = IconButton(
         size_hint_x=0.15, on_press=self.on_toggle_chart_mode)
     self.append_option_button(self.chart_mode_toggle_button)
     self.x_axis_value_label = LabelButton(
         size_hint_x=0.5, on_press=self.on_toggle_chart_mode)
     self.append_option_button(self.x_axis_value_label)
     self._refresh_chart_mode_toggle()
Exemple #3
0
    def show_control_buttons(self):
        if self.control_buttons != None:
            return

        lb = GridLayout()
        lb.size_hint = (0.65, 1) 
        lb.add_widget(Widget())

        # Make buttons
        ncols = 1
        flaglist = self.my_flags.split(',')
        for button_name in flaglist:
            b = IconButton()
            b.set_image(button_name, None, None) # groupdict, groupname)
            b.my_button_action = button_name
            b.bind(on_release = self.my_user_button_pressed)
            lb.add_widget(b)
            ncols += 1

        lb.cols = ncols
        self.add_widget(lb)
        self.control_buttons = lb
Exemple #4
0
 def add_option_buttons(self):
     '''
     Add additional buttons needed by this widget
     '''
     self.append_option_button(
         IconButton(text=u'\uf0b2', on_press=self.on_center_map))