ComponentOne True DBGrid Pro 8
Using the built-in combo box

The Column object's ValueItems collection optionally provides a built-in combo box interface that works in concert with its automatic data translation features. By default, the Presentation property is set to 0 - Normal, and the usual cell editing behavior is in effect for textual data. However, if you set the Presentation property to either 2 - Combo Box or 3 - Sorted Combo Box, then cells in the affected column display the in-cell button upon receiving focus. When the user clicks the in-cell button, a drop-down combo box appears.

The drop-down combo box contains one item for each member of the ValueItems collection. If the collection's Translate property is True, then the DisplayValue text is used for the combo box items; if it is False, then the Value text is used.

True DBGrid automatically sizes the drop-down combo box to fit the width of the column in which it is displayed. The height of the combo box is determined by the number of items in the collection and the MaxComboItems property. If the number of items is less than or equal to MaxComboItems, which has a default value of 5, then all value items will be shown. If the number of  items exceeds MaxComboItems, only MaxComboItems will be shown, but a scroll bar will appear at the right edge of the combo box to allow users to bring the other items into view.

The AnimateWindow property provides additional control over the animation behavior of the drop-down combo box as it opens and closes. Use the AnimateWindowTime property to control the duration of the animation, the AnimateWindowDirection property to control the direction of the animation effect, and the AnimateWindowClose property for additional control over the behavior of the animation when closing the drop-down combo box.

Note: These properties have a system requirement of Windows 98 or NT 5.0, or higher.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback