Example #1
0
 def init(self, parent):
     """ Finishes initializing the editor by creating the underlying toolkit
         widget.
     """
     self._control = ThemedControl(theme=self.factory.theme)
     self.control = self._control.create_control(parent)
     self.set_tooltip()
Example #2
0
    def _get_closed_page(self):
        """ Returns the 'closed' form of the notebook page.
        """
        result = ThemedControl(theme=self.closed_theme,
                               text=self.name,
                               controller=self,
                               default_alignment='center',
                               state='closed')
        result.create_control(self.notebook.control)

        return result
    def init(self, parent):
        """ Finishes initializing the editor by creating the underlying toolkit
            widget.
        """
        # Create the checkbox and its control:
        item = self.item
        factory = self.factory
        label = self.string_value(factory.label or item.label)
        min_size = (0, 0)
        if factory.theme is not None:
            min_size = (80, 0)

        self.checkbox = checkbox = ThemedControl(
            **factory.get('image', 'position', 'spacing', 'theme')).set(
                text=label, controller=self, min_size=min_size)
        self.control = checkbox.create_control(parent)

        # Set the tooltip:
        self.set_tooltip()
Example #4
0
    def init(self, parent):
        """ Finishes initializing the editor by creating the underlying toolkit
            widget.
        """
        # Create the button and its control:
        factory = self.factory
        label = factory.label
        if (label == '') and (factory.image is None):
            label = self.item.get_label(self.ui)
        label = self.string_value(label)

        self.button = button = ThemedControl(
            **factory.get('theme', 'image', 'position', 'spacing')).set(
                text=label,
                controller=self,
                default_alignment='center',
                min_size=(80, 0))
        self.control = button.create_control(parent)

        # Set the tooltip:
        self.set_tooltip()