Copyright © Kambiz R. Khojasteh. All rights reserved.
Get future component updates from http://www.delphiarea.com.
DESCRIPTION
TMRUFiles is a non-visual component, which holds a list of most recently used filenames (or any other custom item) and displays them on a popup menu.
PROPERTIES
- MenuItem: TMenu
Determines the menu item that the most recently used items will be added below it.
- MaxEntries: Byte
This is the maximum number of filenames that the list can track. When the list already contains the maximum items, adding a new filename to the list will delete the oldest one.
- FullPath: Boolean
Determines whether the component shows full path of the files in the menu.
- Hint: String
Determines the hint of items on the menu.
- Numbered: Boolean
Determines whether the component numbers the files in the menu.
- Prefix: Boolean
Determines the string prefix of each item stored in the regitstry or INI file.
- Files: TStringList (Read-only)
This property can be used for direct access to the stored filenames.
METHODS
- procedure Add(const FileName: String)
Adds the Filename to the list and updates the menu.
- procedure Remove(const Filename: String)
Removes the Filename from the list and updates the menu.
- Procedure Rename(const OldFileName, NewFileName: String)
Renames OldFileName to NewFileName in the list and updates the menu.
When OldFileName is an empry string, the method adds NewFileName to the list.
When NewFileName is an empty string, the OldFileName will be removed.
- Procedure LoadFromRegistry(const Key: String)
Loads the list from the registry. (32bit Only).
- procedure SaveToRegistry(const Key: String)
Saves the list to the registry. (32bit Only).
- procedure LoadFromIni(const IniFileName, Section: String)
Loads the list from the INI file.
- Procedure SaveToIni(const IniFileName, Section: String)
Saves the list to the INI file.
- Procedure LoadFromFile(const Filename: String)
Loads the list from a text file.
- Procedure SaveToFile(const Filename: String)
Saves the list into a text file.
EVENTS
- OnClick: TMRUClickEvent
TMRUClickEvent = procedure(Sender: TObject; const Filename: String) of object
This event is triggered when a file in the menu is clicked.
- OnMenuItem: TMRUGetTextEvent
TMRUMenuItemEvent = procedure(Sender: TObject; Index: Integer; MenuItem: TMenuItem) of object
This event is triggered when a fles i going to add to menu. Use this event to customize the menu item.
HISTORY
- 1.14 (August 16, 2003)
- Prefix and Hint properties are added (thanks to Wolfgang Ehrhardt).
- Now, the filenames containing ampersand character appear properly on the menu (thanks to Wolfgang Ehrhardt).
- 1.13 (May 18, 2003)
- FullPath property and OnMenuItem event are added.
- Bug on setting value ofMaxEntries property fixed (thanks to Michel Delabaere).
- 1.12 (December 26, 2001)
- Now, in all procedurs, strings pass as constant.
- 1.11 (April 27, 2000)
- A reported bug on Delphi 2 and Delphi 3 fixed.
- 1.10 (April 6, 2000)
- ItemPos and Menu properties removed.
- MenuItem property added.
- 1.00 (July 17, 1999)
- Initial release.
LICENSE
TMRUFiles component is freeware. You may copy component's files AS LONG AS YOU COPY ALL OF THEM. If you want to change the source code in order to improve the component's features, performance, etc. please send me the new source code so that I can have a look at it. The changed source code should contain descriptions what you have changed, and of course your name. The only thing you MAY NOT CHANGE is the ORIGINAL COPYRIGHT INFORMATION.
DISCLAIMER
TMRUFiles 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. The author is NOT liable for any DAMAGES resulting from the use and misuse of the component, especially he is NOT liable for DAMAGES that were caused BY ANY VERSION WHICH HAS NOT BEEN PROGRAMMED BY THE AUTHOR HIMSELF.