MCPcopy Create free account
hub / github.com/mhammond/pywin32 / GetActiveEditControl

Function GetActiveEditControl

Pythonwin/pywin/framework/scriptutils.py:125–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123 return None
124
125def GetActiveEditControl():
126 view = GetActiveView()
127 if view is None: return None
128 if hasattr(view, "SCIAddText"): # Is it a scintilla control?
129 return view
130 try:
131 return view.GetRichEditCtrl()
132 except AttributeError:
133 pass
134 try:
135 return view.GetEditCtrl()
136 except AttributeError:
137 pass
138
139def GetActiveEditorDocument():
140 """Returns the active editor document and view, or (None,None) if no

Callers 1

RunTabNannyFunction · 0.85

Calls 1

GetActiveViewFunction · 0.85

Tested by

no test coverage detected