Microsoft KB Archive/175613

= FIX: Combo Box ItemTips Prevents Selection and DisplayValue =

Article ID: 175613

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q175613



SYMPTOMS
When a combo box that has a narrow column width and ItemTips property is set to true (.T.), the ItemTips window prevents the selection of a choice from the list of values in the combo box.



RESOLUTION
To work around this problem, do not use the ItemTips by retaining its default setting of False (.F.) or by using the Alt+DownArrow key on the keyboard to select a choice from the combo box list.

You will notice that the ItemTips do not display if you use the keyboard to select a choice.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro version 6.0



MORE INFORMATION
ItemTips is a new property in Visual FoxPro version 5.0 that applies to combo box and list box objects. An item tip is a small window that displays an entire combo box or list box item when the mouse pointer is positioned over the item. Whenever items in a combo box or list box control are longer than the width of the control, setting the ItemTips property to true (.T.) displays the entire text of the item, similar to ToolTips in a toolbar.

Steps to Reproduce Behavior
 Create a new form. Add any table to the Data Environment of the form. Add a ComboBox object as Combo1. Set the RowSourceType property to 6 - Fields. Set the RowSource property to any table field. Set the ColumnCount property to 2.</li> Set the ColumnWidths property to 10,10.</li>  Select the InteractiveChange event, and double-click to open a code window. Enter the following code into the Combo1.InteractiveChange window: This.DisplayValue=This.Value This.Refresh </li> Set the ItemTips property to .T. - True.</li> Run the form. Notice that the choices in the drop-down list are displayed in a very narrow column, and that when you place your mouse pointer over a choice that the Item Tips displays the complete text of the choice; however, when you select a choice nothing is displayed in the combo box. In order to see the problem, be sure to wait until the item tip is displayed before clicking the mouse to make a choice.</li></ol>

To prove that the ItemTips property prevents the item chosen in the drop- down list box from showing as the display value, just modify the form and set the Combo1.ItemTips property to .F. - False (Default) and re-run the form. Notice that the full text of the choice cannot be seen; however, the selection chosen appears in the combo box.

(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Perry Newton, Microsoft Corporation.

Keywords: kbbug kbfix kbvfp600fix KB175613

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.