Package Gnumed :: Package wxpython :: Module gmResizingWidgets :: Class cResizingSTC |
[frames] | no frames]

# Class cResizingSTC

source code

    wx.stc.StyledTextCtrl --+
                            |
                           cResizingSTC

A StyledTextCrl that monitors the size of its internal text and resizes the parent accordingly.

MUST ONLY be used inside ResizingWindow !

FIXME: override standard STC popup menu

Instance Methods
__init__(self, parent, id, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, data=None) | source code
set_keywords(self, popup_keywords=None) | source code
SetText(self, text) | source code
ReplaceText(self, start, end, text, style=None) | source code
Embed(self, text, data=None) | source code
DelPhrase(self, pos) | source code
SetFocus(self, x=None, line=None) Set focus to current position in STC. | source code
AttachMatcher(self, matcher) Attaches a gmMatchProvider to the STC,this will be used to drive auto-completion | source code
SetData(self, data) Configures the data associated with this STC @param data The associated data @type data Any object | source code
GetData(self) Retrieves the data associated with this STC | source code
replace_text(self, start=None, end=None, text=None, style=None) Oddly, the otherwise very rich wx.STC API does not provide an easy way to replace text, so we provide it here. | source code
replace_keyword_with_expansion(self, keyword=None, position=None) | source code
MakePopup(self, text, data, parent, cursor_position) An overrideable method, called whenever a match is made in this STC Designed for producing popups, but the overrider can in fact, do whatever they please. | source code

Method Details

### SetFocus(self, x=None, line=None) | source code
    Set focus to current position in STC.

    - make sure that's visible, too

### replace_text(self, start=None, end=None, text=None, style=None) | source code
Oddly, the otherwise very rich wx.STC API does not provide an easy way to replace text, so we provide it here. Parameters: `start` - the position in the text to start from `length` - the length of the string to replace `text` - the new string `style` - the style for the replaced string

### MakePopup(self, text, data, parent, cursor_position) | source code
An overrideable method, called whenever a match is made in this STC Designed for producing popups, but the overrider can in fact, do whatever they please. @return True if a poup-up or similar actually happened (which suppresses inserting the match string in the text @rtype boolean