|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--window
Extensions to the window object when running widgets
The window around a widget can be controlled in a more detailed way than normal browser windows. This object provides methods for the following features:
Example:
window.resizeTo(300,300);
The following properties and methods were introduced in Opera 9.5. They are not available in 9.2x and below.
All other properties and methods have been available since 9.2x.
Field Summary | |
String |
defaultStatus
Default status message of this widget. |
String |
status
Status message of this widget. |
Constructor Summary | |
window()
This class has no public constructor. |
Method Summary | |
void
|
moveBy( <int> delta_x, <int> delta_y )
Move the widget by the given delta. |
void
|
moveTo( <int> x, <int> y )
Move the widget to the given coordinates. |
void
|
resizeBy( <int> delta_width, <int> delta_height )
Resize the widget by the given delta. |
void
|
resizeTo( <int> width, <int> height )
Resize the widget to the given size. |
Field Detail |
String defaultStatus
The default status message is shown in the widget panel in the Opera browser if the window.status is cleared.
Example:
window.status = window.defaultStatus;
String status
This status message is displayed in the widget panel in the browser. After a period of inactivity, this message may be cleared automatically. If this property is set to '' or null, it reverts back to the content of window.defaultStatus.
Example:
window.status = numUsers + ' users connected';
Constructor Detail |
window()
Method Detail |
void moveBy( <int> delta_x, <int> delta_y )
Move the widget's left edge delta_x
pixels horizontally and the top edge
delta_y
pixels vertically.
Example:
window.moveBy(200,200);
delta_x
- The number of pixels to move left or right.
delta_y
- The number of pixels to move up or down.
void moveTo( <int> x, <int> y )
Move the widget to position x
,y
.
Example:
window.moveTo(0, 0);
x
- Horizontal coordinate to move to.
y
- Vertical coordinate to move to.
void resizeBy( <int> delta_width, <int> delta_height )
Expand or shrink the widget delta_width
pixels from the right edge of the widget
and delta_height
from the bottom edge of the widget. The position of the widget does
not change.
Example:
window.resizeBy(250, 100);
delta_width
- The number of pixels to increase the width with.
delta_height
- The number of pixels to increase the height with.
void resizeTo( <int> width, <int> height )
Resize the widget to be width
wide and height
high.
The position of the widget does not change.
Example:
window.moveTo(0, 0);
window.resizeTo(screen.availWidth, screen.availHeight);
width
- Width to resize to.
height
- Height to resize to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |