Manage Learn to apply best practices and optimize your operations.

SmartIcon for horizontal scroll

SmartIcon for horizontal scroll

Most people know you can tailor the first half-dozen SmartIcons on your Notes workspace. Go into File | Preferences | SmartIcon Settings and you can add functions you want to add or drop things like "Open URL" that you don't use.

By selecting one of the Macro Button SmartIcons at the bottom of your list, you can add SmartIcons with your own formulas instead of relying on the pre-defined SmartIcons that Notes makes available to you. I find it especially useful to define two SmartIcons. One for @Command ([DebugLotusScript])(toggles debug mode on and off) and @Command ([FileDatabaseACL])(brings up the database ACL screen).

Another more complicated SmartIcon that I wanted to have is one that toggles the horizontal scroll bar on and off. The problem is that there are two functions under Notes that toggle scroll bars: @Command ([EditHorizScrollbar]) and @Command([ViewHorizScrollbar]). If you use @Command([ViewHorizScrollBar]) within a document, you get an error. If you use @Command([EditHorizScrollBar]) within a view, it's ignored completely. So how do you write one function that works in both places?

This isn't rocket science of course and all of us would figure this out if we thought about it awhile but I'll save you some time. I originally presumed there'd be some Notes @function that told you what mode you were in. Perhaps @IsInView vs @IsInDocument. But there are not functions like that. Instead, I had to come to a simpler solution by trapping the error and ignoring it.

I came up with the following SmartIcon formula that toggles on/off the appropriate scroll bar from within a view and from within a document:

@Command([EditHorizScrollbar]); @If(@IsError(@Command
([ViewHorizScrollbar])); @Success; @Success)
This was last published in June 2001

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...