Home > Domino Tips > Administrator > Smart Icons > SmartIcon for horizontal scroll
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SMART ICONS

SmartIcon for horizontal scroll


Bruce Guthrie
06.12.2001
Rating: -3.80- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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:



Code

@Command([EditHorizScrollbar]); @If(@IsError(@Command
([ViewHorizScrollbar])); @Success; @Success)

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Smart Icons
Smart icon to set field value/type, version 2
Easy way to count members of a group
SmartIcon code to display any open database's ReplicaID
SmartIcon shortcut to server
Special action ... SmartIcon @Formula for day-to-day tasks
Quick admin function in Notes client
Get the size of a user's mail database while in the Domino Directory
Quick import-export smart icons
Set field value/type via smart icon
SmartIcon to open a mailfile from NAB

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts