Skip to content

Commit

Permalink
window: remove native title access, it can be done with view.caption …
Browse files Browse the repository at this point in the history
…runtime.
  • Loading branch information
pravic committed Feb 18, 2016
1 parent be64356 commit 7c16297
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions sciter/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,9 @@ def __init__(self, ismain=False, ispopup=False, ischild=False, resizeable=True,
self.attach(wnd=self.hwnd)
pass

def set_title(self, title: str):
"""Set window title."""
ctypes.windll.user32.SetWindowTextW(self.hwnd, title)
return self

def get_title(self) -> str:
"""Get window title."""
cb = ctypes.windll.user32.GetWindowTextLengthW(self.hwnd) + 1
title = ctypes.create_unicode_buffer(cb)
ctypes.windll.user32.GetWindowTextW(self.hwnd, title, cb)
return title

def collapse(self):
def collapse(self, hide=False):
"""Minimize window."""
ctypes.windll.user32.ShowWindow(self.hwnd, 6) # SW_MINIMIZE
ctypes.windll.user32.ShowWindow(self.hwnd, 0 if hide else 6) # SW_HIDE or SW_MINIMIZE
return self

def expand(self, maximize=False):
Expand Down

0 comments on commit 7c16297

Please sign in to comment.