I want to include a legend feature in SMTP Diagnostics to give users a clue as to the meaning of various icons used in the program. I initially tried to accomplish this by creating a new borderless window that displayed the legend. When the user clicked the legend link in the statusbar the legend window would popup. But I found an easier way to do this.

Instead of creating a new window and doing all the leg work behind the scenes to display the window, position the window, add shadowing to the window and so on, I decided to use a WinHelp popup. WinHelp popups are used in many applications such as Microsoft Office to display "What's This?" Help. A nice feature of WinHelp popups is content can be formatted. In the case of SMTP Diagnostics, a WinHelp popup topic is used to display the legend with the icon on the left followed by the text describing the meaning of the icon.

The end result. I reduced the code used in my first attempt at displaying a legend to a single line of code. Delphi and WinHelp do all the work of displaying, positioning, and shadowing the legend window.


Click image to enlarge.

posted by Kirby | 07-Jul-2005 3:55 PM | comments (0)

Add Your Comment

Comment:
(No HTML)

Name:
E-mail/Web site:
Your e-mail/web site will not be published on this site. It is optional and will only be used by me should I need to contact you directly.
 
By checking this option, this site will remember your name and e-mail/web site on future visits. Uncheck this option to have the site not remember who you are on future visits.
 
Enter the code shown above:
Copyright © 1999-2008 Kirby Turner.
Site software written by White Peak Software Inc, a provider of custom software and software development coaching.