FIX: setChecked Not Working on Context MenuID: Q223368
|
When displaying a context menu with submenu items on a control, such as the List View control, the setChecked method does not correctly display a check mark on the context menu's submenu item when a different item is selected.
The WM_INITMENUPOPUP message is not being correctly forwarded to a control's contextMenu.
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
listView1.setView(ViewEnum.SMALLICON);
listView1.setView(ViewEnum.LARGEICON);
private void contextMenuPopup(Object source, Event e)
{
MenuItem currentItem = null;
switch (listView1.getView())
{
case ViewEnum.LARGEICON:
currentItem = menuItem3;
break;
case ViewEnum.SMALLICON:
currentItem = menuItem2;
break;
}
menuItem2.setChecked(false);
menuItem3.setChecked(false);
currentItem.setChecked(true);
}
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Rafael M. Munoz, Microsoft Corporation
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java,
please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
Additional query words:
Keywords : kbservicepack kbVJ600 kbVS600sp2 kbVS600SP1 kbVS600sp3fix
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 20, 1999