This control shows a static text which links to one or more link. The label of this control can be marked-up text. For example: "<a href=\"https://github.com/khchen/wNim\">click here</A> and <a id=\"linkId\">here</a>".
Appearance: | |
Styles: | Styles | Description |
wHlAlignLeft | Align the text to the left. |
wHlAlignRight | Align the text to the right. |
|
proc getItemCount(self: wHyperlinkCtrl): int {...}{.raises: [], tags: [].}
-
Returns the number of items in the hyperlink control.
proc len(self: wHyperlinkCtrl): int {...}{.inline, raises: [], tags: [].}
-
Returns the number of items in the hyperlink control. The same as getItemCount().
proc getFocused(self: wHyperlinkCtrl): int {...}{.raises: [], tags: [].}
-
Returns the index of current focused item.
proc setFocused(self: wHyperlinkCtrl; index: int) {...}{.raises: [], tags: [].}
-
Sets focused item.
proc getUrl(self: wHyperlinkCtrl; index = -1): string {...}{.inline, raises: [], tags: [].}
-
Returns the URL associated with the hyperlink. Index == -1 means the current focused item.
proc getLinkId(self: wHyperlinkCtrl; index = -1): string {...}{.inline, raises: [], tags: [].}
-
Returns the link ID associated with the hyperlink. Index == -1 means the current focused item.
proc getVisited(self: wHyperlinkCtrl; index = -1): bool {...}{.inline, raises: [], tags: [].}
-
Returns true if the hyperlink has already been clicked by the user at least one time. Index == -1 means the current focused item.
proc setUrl(self: wHyperlinkCtrl; url: string; index = -1) {...}{.raises: [IndexDefect],
tags: [].}
-
Sets the URL associated with the hyperlink. Index == -1 means the current focused item.
proc setLinkId(self: wHyperlinkCtrl; linkId: string; index = -1) {...}{.
raises: [IndexDefect], tags: [].}
-
Sets the link ID associated with the hyperlink. Index == -1 means the current focused item.
proc setVisited(self: wHyperlinkCtrl; flag = true; index = -1) {...}{.raises: [], tags: [].}
-
Marks the hyperlink as visited. Index == -1 means the current focused item.
proc init(self: wHyperlinkCtrl; parent: wWindow; id = wDefaultID; label: string = "";
pos = wDefaultPoint; size = wDefaultSize; style: wStyle = 0) {...}{.raises: [
wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect,
wFontError], tags: [RootEffect].}
-
Initializes a hyperlink control.
proc HyperlinkCtrl(parent: wWindow; id = wDefaultID; label: string = "";
pos = wDefaultPoint; size = wDefaultSize; style: wStyle = 0): wHyperlinkCtrl {...}{.
inline, discardable, raises: [wNilAccess, wWindowError, wCursorError, wBrushError,
Exception, IndexDefect, wFontError],
tags: [RootEffect].}
-
Constructor.