Create a TopWindow object.
TopWindow objects have the following methods and properties:
Shows the window. The window is not shown until show() is called.
Hides the window.
Inserts an image object graphics.Image into the window. The position
of the image is specified by the (position) parameter.
If only the coordinates of the top left corner are specified, like (x1, y1)
the image is not resized. If four coordinates are given, like(x1, y1, x2, y2),
the image is resized to fit to the specified area.
Removes the image from the window.
Mandatory parameter image must be a graphics.Image object.
Parameter position may specify the top-left corner coordinates of the
image or the rectangular area of the image. If only image parameter is
given, all the pictures representing this image object are removed from the
window. If both parameters are given, only the picture that matches both
parameters is removed.
Specifies the coordinates of the top left corner of the window. Can be read and written.
Specifies the size of the window. Can be read and written.
The images inserted into the window. Defined as a list of tuple objects. Each
tuple contains a graphics.Image object and the position of the
image. The position may specify the top-left coordinate of the image and
optionally also the bottom-right coordinate of the image. Parameter (x,y)
specifies the top-left coordinate, but does not resize the image while
parameter like (x1,y1,x2,y2) specifies both the top-left and bottom-right
coordinates and possibly also resizes the image. Can be read and written.
Also see the add_image() and remove_image() methods.
sets the window content to be 3 images.
images = [(image1,(x1,y1)), (image2,(x1,y1,x2,y2)), (image3,(50,50,100,100))]
image3 are possibly resized
image1 is not)
Specifies if the shadow of the window is shown and the length of the shadow.
Can be read and written. Setting
shadow = 0 makes the shadow invisible.
shadow = 5
Specifies the corner type of the window. Can be read and written. Corner type
can be one of the following values:
corner_type = "square"
Returns the maximum size of the window as a tuple (width, height). Read only
The background color of the window as an integer (e.g.
0xaabbcc). The two
greatest hexadecimal digits specify the red, the next two specify the blue and
the last ones specify the green color. Can be read and written.
background_color = 0xffffff (sets the white color)
Can be set to 0 or 1. 1 means that window is visible, 0 means that it is not.
Can be read and written. Also see the show and hide methods.
See About this document... for information on suggesting changes.