MIDAS#6 Action Hotspots (Midas Rich Text LSX)
If you would like to try out this sample and you do not currently have a Midas license, request an evaluation license, and one will be mailed to you. Download the Action Hotspots sample db, or take a look at our many other sample databases at the Midas LSX Samples page.
This sample requires Midas 4.x or higher.
Const LSCRIPT = |MessageBox ("LotusScript: This is just a test, but you could have called an agent or done something else altogether")|
Const LSCRIPT_BUTTON = |Sub Click(Source As Button)
MessageBox ("LotusScript: Just a test, but could have done much more")
' *** Connect to rich text item with Midas
Call rtitem.ConnectBackend(doc.Handle, "Body", True)
rtitem.ActionHotspotFont = "Blue underline"
' *** Define the initial chunk you want to use and add whatever processing is necessary.
Set rtchunk = rtitem.DefineChunk("Everything")
' *** Add the LotusScript versions
Call rtchunk.AppendText("LotusScript Hotspots" & Chr(0), SECTION_TITLE_FONT)
Call rtchunk.AppendText("You can make an action hotspot which is a ", EXPLANATION_FONT)
Call rtchunk.AppendHotspot("Action LotusScript", LSCRIPT, "", "text hotspot")
Call rtchunk.AppendText(" or a ", EXPLANATION_FONT)
Call rtchunk.AppendHotspot("LotusScript Button", LSCRIPT_BUTTON, |TextFont='Red Default Sans Serif 8pt'|, "button")
Call rtchunk.AppendText(" or even wrap it around a graphic ", EXPLANATION_FONT)
Call rtchunk.AppendHotspot("Action LotusScript", LSCRIPT, "", " ")
Set rtHotspot = rtitem.DefineChunk("Inside Hotspot 6; Text 1")
Call rtHotspot.InsertResource("Image", "actn008.gif", "GraphicWidth=21 GraphicHeight=21")
rtHotspot.Text = ""
Call rtchunk.AppendText(Chr(0) & Chr(0), EXPLANATION_FONT)