TMILFLashLabel v1.0.0
by Larry J. Rutledge

© Copyright 1998, Millennial Software, All Rights Reserved

  1. Component Description
  2. Properties and Events
  3. Installation
  4. Contacting the Author
  5. Disclaimer

Description

Delphi 3's installation menu had an interesting feature, when the mouse hovered over a menu item it glowed. Then if you clicked on the menu item, it moved like a button. I was, to say the least, impressed with this and mistakenly thought that I would be able to find this component with the included VCL; it wasn't.

Well, it's been a while now since Delphi 3 has been released, in fack Delphi 4 is out and it didn't include this component either. So, I built my own TMILFlashLabel.

It's really a fairly simple component, there are only three properties of interest: 1) Caption, 2) Normal Color, and 3) Highlight Color. The Caption is where you specify what the label will display (just like a TLabel). Normal Color is where you specify the color of the unhighlighted text, it is also the color of the text in the middle of the highlight. Highlight Color is the color to draw around the label when the mouse moves over it.

You can also set the label's font with the Font property and there is an OnClick event to handle processing when the item is clicked.

During testing I added two properties Hover and MouseIsDown to test the various states without running an application every time I made a change. I decided to leave them, who knows you may find a use for them someday. Hover indicates whether to simulate the mouse hovering over the label or not. If Hover is true the label will be highlighted. MouseIsDown simulates a mouse click, if it is true the label will appear over and down two pixels from the original position.

Because I needed to trap the CM_MOUSEENTER and CM_MOUSELEAVE messages to detect when to highlight the label, I decided to surface those events. You don't have to use them for anything, but if you ever need to know when the mouse enters or leaves the label, these events will tell you.

Return to the top


Properties and Events

Properties


Events
Return to the top


Installation

1. Unzip flashlbl.zip to a temporary directory.
2. Copy MILFlashLabel.PAS, MILFlashLabel.DCR, MILAbout.PAS, and MILAbout.DFM to your components directory.
3. Install component file MILFlashLabel.PAS.
4. The new component should appear on a tab titled "Millennial".

Return to the top


Contacting the author

If you have questions, comments, bug reports, modifications, etc. please contact the author at:  Larry J. Rutledge


TMILFlashLabel is Freeware and can be used in freeware, shareware and commercial productions without my permission. You may modify the code, but please do not forget the documentation (and the credits).

You may not sell the component or the source without significant modifications.

Return to the top


Disclaimer

This software is provided "AS IS" without any warranty of any kind, either express or implied. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair or correction. In no event shall the author, copyright holder, or any other party who may redistribute the software be liable to you for damages, including any general, special, incidental, or consequental damages arising out of the use or inability to use the software (including, but not limited to, loss of data, data being rendered inaccurate, loss of business profits, loss of business information, business interruptions, loss sustained by you or third parties, or a failure of the software to operate with any other software) even if the author, copyright holder, or other party has been advised of the possibility of such damages.


For more information on various Delphi topics, visit the on-line newsletter "Delphi Gazette". You can find it at the following address:
http://www.prestwood.com/forums/delphi/sdug/newsletter/.


Return to the top
Last Updated: December 4, 1998