Class HtmlImg
This widget represents the HTML image element. It supports the
following attributes:
- src -
String representing source URL of the image.
- alt -
Alternate text for the image.
- align -
The alignment for the image. It may take the values "left" and
"right".
- height -
The height of the image in pixels.
- width -
The width of the image in pixels.
- border -
The width of the white space border surrounding the image.
- hspace -
Extra horizontal space at the left and right of the image.
- vspace -
Extra horizontal space bellow and above the image.
- name -
Name assigned to the image.
- ismap -
Boolean value signaling if the image has an image map.
constructor
Initializes the object.
|
get attribName
Fetches the value of an attribute.
|
init attribList
Initializes the values of a set of attributes.
|
render
Outputs the HTML representation of the widget.
|
set attribName attribValue
Changes the values of one of the widget attributes.
|
|
constructor
HtmlImg constructor
Initializes the object.
-
get
HtmlImg get attribName
Fetches the value of an attribute.
- Parameters:
- attribName -
Symbol identifying the attribute whose value is being fetched.
- Returns:
-
The value of the
attribName attribute.
-
The
attribName argument must be one of the supported
attributes.
init
HtmlImg init attribList
Initializes the values of a set of attributes.
- Parameters:
- attribList -
A list with the attributes and its values.
- Returns:
-
A reference to the object for which the method was called.
-
Initializes attributes of the widget. These
are attributes known to the
set and
get methods.
The attribList argument contains the attributes
names and values. It is a list where each
element specifies an attribute. Each element
is a two element list: a symbol identifying the attribute and
its new value.
render
HtmlImg render
Outputs the HTML representation of the widget.
-
set
HtmlImg set attribName attribValue
Changes the values of one of the widget attributes.
- Parameters:
- attribName -
Symbol identifying the attribute whose value will be modified.
- attribValue -
The new value of the attribute.
- Returns:
-
A reference to the object for which the method was called.
-
The
attribName argument must be the same as one of the
symbols passed to the init method, otherwise a
runtime error will occur.
Report a bug or request new features
© 2013