rtLib — Notes Rich Text Management Library Documentation of rtLib — Notes Rich Text Management Library Download rtLib — Notes Rich Text Management Library FAQ of rtLib — Notes Rich Text Management Library Purchase rtLib — Notes Rich Text Management Library Feedback about rtLib — Notes Rich Text Management Library

Cookbook

Hotspot creation

Start search Mail feedback Back to Description


rtHotspot rtPopup rtButton rtLabel rtHotLink

add (rtContainer) appendText (rtContainer) appendText (rTextParagraph) ActionType Add (rtCollection) Add (rTextParagraph) Border (rtHotspot) Border (rtStyle) getRichTextItem Highlight HotspotType isMouseOver Text (rtHotLink) Text (rtLabel)

Code fragment from sample "Hotspot creation"; see full running samples in downloadable help.
Call ctxDump.getRichTextItem(doc,"Body")
' starting with rtLib 1.1 hotspots get signed (provided Domino version is 5.0.8 or higher);
'

' Dim compText As rtPopup' computed text
Dim button As rtButton' formula button
Dim popupText As rtPopup' text popup
Dim popupComp As rtPopup' computed pop-up
Dim rth as rtHotspot

' ### Formula popup
Set popupComp= New rtPopup(HOTSPOTREC_RUNFLAG_FORMULA) ' uses formula
With popupComp
.Formula ={_a:="} &ses.commonuserName &{";"You are " +_a + " - nicht wahr?"} ' {"NO TEXT"}
Set .Content = New rtContainer
.Content.appendText "Formula popup"
End With
ctxDump.add popupComp
'
' ### Formula action
' create at once of particular type
'Set rth = New rtHotspot(HOTSPOTREC_TYPE_HOTREGION, RT_ACTION_FORMULA)
' OR
Set rth = New rtHotspot(0,0)
' and set separate properties
rth.Hotspottype = HOTSPOTREC_TYPE_HOTREGION
rth.ActionType = RT_ACTION_FORMULA

rth
.Formula = {@prompt([OK];"*";@UserName)}
rth.Border = False
rth.Highlight = True
rth.appendText {Formula hotspot}
ctxDump.add rth

' ### Button
Set button = New rtButton(0)
Set button.Label = new rtLabel ("Button label") ' this is label
button.Formula = {@Prompt([OK];"Servus";@Name([cn];@username))}
ctxDump.add button

' ### Text popup
Set popupText= New rtPopup(0) ' uses Text
With popupText
.Border = False
.Highlight = True
.isMouseOver = True
.Text = "Text popup popup text!"
Set .Content = New rtContainer
.Content.appendText "Text popup."
End With
ctxDump.add popupText

'### Computed Text (take a formula popup and say it's HOTSPOTREC_RUNFLAG_COMPUTED =|'-)
Set compText = New rtPopup(HOTSPOTREC_RUNFLAG_COMPUTED Or _
HOTSPOTREC_RUNFLAG_FORMULA Or _
HOTSPOTREC_RUNFLAG_NOBORDER)
compText.Formula={_a:="} &ses.commonuserName &{";@if(@Name([CN];@username)="Klaus Brand";"- no info for " + _a + " - ";"You are " +_a + " - nicht wahr?") }
ctxDump.add compText

'### URL HOTLINK
Dim hot as rtHotLink
Set hot = New rtHotLink(HOTSPOTREC_RUNFLAG_INOTES)
hot.Text="http://www.lotus.com"
set hot.Content = New rtContainer
hot.Content.appendText "lotus link"
ctxDump.add hot