Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def textRouter::TextRouter::updateTextBoxFromClipboard (   self  ) 

Updates the text box from clipboard, taking in to account the current input mode.

Needed because for the clipboard so we can use .paste() and not mess with wxTheClipboard.

Definition at line 2380 of file textRouter.py.

02380                                         :
        """Updates the text box from clipboard, taking in to account the current input mode.

        Needed because for the clipboard so we can use .paste() and not mess with wxTheClipboard."""
        mode = self.getInputActionMode()
        if mode == "replace":
            self.components.area1.text = ""
            self.components.area1.paste()
        elif mode == "append":
            curpos = self.components.area1.getInsertionPoint()
            cursel = self.components.area1.getSelection()

            self.components.area1.setInsertionPoint(self.components.area1.getLastPosition())
            self.components.area1.setSelection(self.components.area1.getLastPosition(), \
                                               self.components.area1.getLastPosition())
            
            self.components.area1.paste()
            wx.Yield() # needed because the above statement seems to happen after the two below sometimes
            self.components.area1.setInsertionPoint(curpos)
            self.components.area1.setSelection(cursel[0], cursel[1])
        elif mode == "insert":
            self.components.area1.paste()
        


    def status(self, txt):


Generated by  Doxygen 1.6.0   Back to index