Misc. Resources

Specified Mini-Lesson

MIDAS#6 Action Hotspots (Midas Rich Text LSX)

The Action Hotspots sample database shows how to use the Midas Rich Text LSX to create buttons, and other hotspots with formula language, LotusScript or JavaScript behind them. This simple video shows the database in action to help guide those who may be interested in the ability to create hotspots automatically, whether on documents or pages or forms. The database was originally created in 2003 for Lotus Notes 6 using Midas V3, but has been updated and tested with all versions up to IBM Notes 9 and Midas V4.32 and the upcoming Midas V5.00. The section of agent code creating LotusScript hotspots is shown below:
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")
End Sub|
' *** 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)

Copyright 2014-2022 Genii Software Ltd. All Rights Reserved.