Google Apps Script
Feedback on this document

Class InlineHyperlink

Deprecated. This class is deprecated and should not be used in new scripts.

A widget that serves as an "internal" hyperlink. That is, it is a link to another state of the running application. It should behave exactly like Hyperlink, save that it lays out as an inline element, not block.

Internally, UiApp widgets are built on top of the Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation directly. You can find the InlineHyperlink documentation here.

Methods

MethodReturn typeBrief description
addStyleDependentName(styleName)InlineHyperlinkSets the dependent style name of this InlineHyperlink.
addStyleName(styleName)InlineHyperlinkAdds a style name to this InlineHyperlink.
getId()StringReturns the id that has been assigned to this object.
getTag()StringGets the text tag of this InlineHyperlink.
getType()StringGets the type of this object.
setHTML(html)InlineHyperlinkSets the HTML content of this InlineHyperlink.
setHeight(height)InlineHyperlinkSets the height of this InlineHyperlink.
setId(id)InlineHyperlinkSets the id of this InlineHyperlink.
setPixelSize(width, height)InlineHyperlinkSets the size of this InlineHyperlink in pixels.
setSize(width, height)InlineHyperlinkSets the size of this InlineHyperlink.
setStyleAttribute(attribute, value)InlineHyperlinkSets one of this InlineHyperlink's style attributes to a new value.
setStyleAttributes(attributes)InlineHyperlinkSets this InlineHyperlink's style attributes.
setStyleName(styleName)InlineHyperlinkSets the style name of this InlineHyperlink.
setStylePrimaryName(styleName)InlineHyperlinkSets the primary style name of this InlineHyperlink.
setTag(tag)InlineHyperlinkSets the text tag of this InlineHyperlink.
setText(text)InlineHyperlinkSet the display text of this InlineHyperlink.
setTitle(title)InlineHyperlinkSets the hover title of this InlineHyperlink.
setVisible(visible)InlineHyperlinkSets whether this InlineHyperlink is visible.
setWidth(width)InlineHyperlinkSets the width of this InlineHyperlink.

Detailed documentation

addStyleDependentName(styleName)

Sets the dependent style name of this InlineHyperlink.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


addStyleName(styleName)

Adds a style name to this InlineHyperlink.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


getId()

Returns the id that has been assigned to this object.

This can be used in conjunction with app.getElementById() to retrieve a reference to this object.

Return

String — the id that has been assigned to this object


getTag()

Gets the text tag of this InlineHyperlink.

Return

String — the text tag.


getType()

Gets the type of this object.

Return

String — the object type


setHTML(html)

Sets the HTML content of this InlineHyperlink.

Parameters

NameTypeDescription
htmlStringthe new HTML

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setHeight(height)

Sets the height of this InlineHyperlink.

Parameters

NameTypeDescription
heightStringthe new height in any CSS unit such as "10px" or "50%".

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setId(id)

Sets the id of this InlineHyperlink.

Parameters

NameTypeDescription
idStringthe new id, which can be used to retrieve the InlineHyperlink from app.getElementById(id).

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setPixelSize(width, height)

Sets the size of this InlineHyperlink in pixels.

Parameters

NameTypeDescription
widthIntegerthe new width in pixels.
heightIntegerthe new height in pixels.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setSize(width, height)

Sets the size of this InlineHyperlink.

Parameters

NameTypeDescription
widthStringthe new width in any CSS unit such as "10px" or "50%".
heightStringthe new height in any CSS unit such as "10px" or "50%".

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setStyleAttribute(attribute, value)

Sets one of this InlineHyperlink's style attributes to a new value.

Possible attributes are the same as those available in CSS style sheets. Since some CSS code may be malicious, attributes are whitelisted explicitly and therefore some CSS attributes may not be available.

 // Change the widget's background to black and text color to green.
 widget.setStyleAttribute("background", "black")
     .setStyleAttribute("color", "green");
 

Parameters

NameTypeDescription
attributeStringthe CSS attribute, in camelCase. ("fontSize", not "font-size").
valueStringthe CSS value

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setStyleAttributes(attributes)

Sets this InlineHyperlink's style attributes. This is a convenience method that is equivalent to calling setStyleAttribute with every key/value pair in the attributes object.

 // Change the widget's background to black and text color to green.
 widget.setStyleAttributes({background: "black", color: "green"});
 

Parameters

NameTypeDescription
attributesObjectthe CSS attributes and values to set.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setStyleName(styleName)

Sets the style name of this InlineHyperlink.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setStylePrimaryName(styleName)

Sets the primary style name of this InlineHyperlink.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setTag(tag)

Sets the text tag of this InlineHyperlink.

Parameters

NameTypeDescription
tagStringthe new text tag, which can be anything you wish to store with the widget.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setText(text)

Set the display text of this InlineHyperlink.

Parameters

NameTypeDescription
textStringthe new text.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setTitle(title)

Sets the hover title of this InlineHyperlink.

Not all browsers will show this.

Parameters

NameTypeDescription
titleStringthe hover title.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setVisible(visible)

Sets whether this InlineHyperlink is visible.

Parameters

NameTypeDescription
visibleBooleanwhether this InlineHyperlink should be visible or not.

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.


setWidth(width)

Sets the width of this InlineHyperlink.

Parameters

NameTypeDescription
widthStringthe new width in any CSS unit such as "10px" or "50%".

Return

InlineHyperlink — the InlineHyperlink itself, useful for chaining.

Deprecated methods


Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.