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

def textRouter::TextRouter::on_menuHtmlCenter_select (   self,
  event 
)

Puts the prefrence of centering tag's around selected text.

Definition at line 562 of file textRouter.py.

00562                                              :
        """Puts the prefrence of centering tag's around selected text."""
        # we need this here because the <DIV> option isn't simply <DIV> </DIV>, we have the attribute, etc
        widget = self.components.area1
        if hasattr(widget, 'editable') and widget.canCut():
            sel = widget.getSelection()
            selectedText = widget.getStringSelection()
            if self.htmlPrefs["centerTag"] == "center":
                self.tagSelection("center")
            else:
                widget.replaceSelection('<div align="center">%s</div>' % (selectedText))
                divLen = len('<div align="center"></div>')
                widget.setSelection( sel[0], (sel[1] + divLen) )
            self.saveState()


    def on_menuHtmlPreferences_select(self, event):


Generated by  Doxygen 1.6.0   Back to index