コード例 #1
0
    def click(self):
        if self.auto_keyboard:
            # first we get the appropriate TextEdit Service
            text_edit = Service('TextEdit')
            # Then we call the service with our text

            def on_done(text):
                self.text = text
                self.item.value = text
            text_edit.edit(self.window, self.text).start(on_done)
コード例 #2
0
 def edit(self, window, **kargs):
     """return a `Tasklet` that can be used to edit the widget"""
     # first we get the appropriate TextEdit Service
     text_edit = Service('TextEdit')
     # Then we call the service with our text
     return text_edit.edit(window,
                           self,
                           input_method=self.input_method(),
                           **kargs)