Here are the examples of the python api System.Console.WindowHeight taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 Examples
3
Example 1
def clear_to_end_of_window(self):
oldtop = self.WindowTop
lastline = self.WindowTop + System.Console.WindowHeight
pos = self.pos()
w, h = self.size()
length = w - pos[0] + min((lastline - pos[1] - 1), 5) * w - 1
self.write_color(length * " ")
self.pos(*pos)
self.WindowTop = oldtop
3
Example 2
def scroll_window(self, lines):
'''Scroll the window by the indicated number of lines.'''
top = self.WindowTop + lines
if top < 0:
top = 0
if top + System.Console.WindowHeight > System.Console.BufferHeight:
top = System.Console.BufferHeight
self.WindowTop = top
3
Example 3
def clear_to_end_of_window(self):
oldtop=self.WindowTop
lastline=self.WindowTop+System.Console.WindowHeight
pos=self.pos()
w,h=self.size()
length=w-pos[0]+min((lastline-pos[1]-1),5)*w-1
self.write_color(length*" ")
self.pos(*pos)
self.WindowTop=oldtop
3
Example 4
def scroll_window(self, lines):
'''Scroll the window by the indicated number of lines.'''
top=self.WindowTop+lines
if top<0:
top=0
if top+System.Console.WindowHeight>System.Console.BufferHeight:
top=System.Console.BufferHeight
self.WindowTop=top