Python win32con.EM_SETSEL Examples
The following are 3
code examples of win32con.EM_SETSEL().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
win32con
, or try the search function
.
Example #1
Source File: control_output.py From dragonfly with GNU Lesser General Public License v3.0 | 5 votes |
def write(self, data): length = win32gui.GetWindowTextLength(self.handle) win32gui.SendMessage(self.handle, win32con.EM_SETSEL, length, length) win32gui.SendMessage(self.handle, win32con.EM_REPLACESEL, False, data)
Example #2
Source File: console.py From eavatar-me with Apache License 2.0 | 5 votes |
def append_message(self, msg): ctrl = win32gui.GetDlgItem(self.hwnd, IDC_MESSAGE) old_msg = win32gui.GetWindowText(ctrl) new_msg = old_msg + PROMPT1 + msg.strip() + NEW_LINE win32gui.SetWindowText(ctrl, new_msg) self._scroll_message(ctrl) # index = len(new_msg) # win32gui.SendMessage(ctrl, win32con.EM_SETSEL, index, index)
Example #3
Source File: console.py From eavatar-me with Apache License 2.0 | 5 votes |
def _scroll_message(self, hEdit): win32gui.SendMessage(hEdit, win32con.EM_SETSEL, 0, -1) win32gui.SendMessage(hEdit, win32con.EM_SETSEL, -1, -1) win32gui.SendMessage(hEdit, win32con.EM_SCROLLCARET, 0, 0)