Developer Documentation Library > Scripting > mrScriptMetadata User's Guide > mrScriptMetadata reference > Image attributes
 
Image attributes
Displaying image attributes as part of a question, information, or response text
The following examples demonstrate how to display image attributes as part of a question, information, or response text:
labelstyle(image (Name= "filename" [, position = "position"])
The mrScriptMetadata syntax is supported as:
labelstyle(image (Name = "filename" [, Position = "position"] [,Width="***"] [,Height="***"] [,AltText="***"])
The width and height attributes are defined as pixels.
The IImageStyle class (see Interview Object model) supports these image attributes:
AltText: Sets the image alternate text
Height As String: Sets the image height
Name As String: The image name (default)
Position As ImagePositions: The image position, equivalent to IStyle ImagePosition
Width As String: Sets the image width
The HTML fragment would display similarly to:
<img src="smiley.gif" alt="Smiley face" width="42" height="42" />
Using the Image style in an MDD file
The following examples demonstrate how to us the Image style in an MDD file:
BestLogo "Which logo looks best?"
categorical [1..1]
{
PinkLogo ""
style(
Image(
Name = "logo_fuchsia.gif",
Height = "100",
Width = "100",
Position = "Right",
AltText = "logo_fuchsia"
),
Control(
Type = "Button"
)
),
BlueLogo ""
style(
Control(
Type = "Button"
)
),
GreenLogo ""
style(
Control(
Type = "Button"
)
),
YellowLogo ""
style(
Control(
Type = "Button"
)
)
};
SeenLogo1 "Have you seen this image in any advertising during
the last two weeks?"
    labelstyle(
   Image(
Name = "catsnax.gif",
Height = "100",
Width = "100",
Position = "Bottom",
AltText = "catsnax"
   )
)
categorical [1..1]
{
Yes "Yes",
No "No",
- "Don't remember" DK
};
See
mrScriptMetadata reference