Version

Limiting the Number of Items Added to the MRU List

This topic applies to the following WinEditor™ controls:

  • WinComboEditor™

  • WinFontNameEditor™

An MRU list is a Most Recently Used list. What this means is that the element will move the most recently selected items to the top of the drop-down. For example the font drop-down in Microsoft Word does this. It has a list at the top of the font drop-down to hold the values of your most recently used fonts, separated by a bar from the rest of the items on the font list.

This functionality is included in WinComboEditor and WinFontNameEditor. To allow these elements to use an MRU List, set the HasMRUList property to true and then set the MaxMRUItems equal to the number of items you want the element to keep in the MRU portion of the list. To enable the MRU List for these elements, use the following code. (You can also set these property values at design-time using the custom property pages.)