Posted 18 years ago
by Rick
-
Developer,
Visual Software Systems LLC
Version: 2.0.78
Platform: .NET 2.0
Environment: Windows XP (32-bit)
I've found two bugs with the BarTextBoxCommand when used in a Popup Menu:
1) You get a System.NullReferenceException when trying to display a popup menu that includes a BarTextBoxCommand. The exception occurs the second time you request the popup menu.
2) The image assigned to the BarTextBoxCommand through the image index property of the command does not appear on the popup menu either at design time or run time
Recreating the problem using the VB.Net sample project:
1) Open BarForm.vb in design mode
2) Edit the Quick Find command and add an image to it through the Image Index property
3) Bring up the Text Document Context PopupMenu and add the Quick Find command to the menu. Notice that the image you assigned to the command does not display. You can override the DisplayStyle for the commandlink, but that will have no affect
4) Run the project and launch the Bar Controls sample
5) Right click on the document in the tab to display the popup menu. The menu will display, but you'll notice that the Quick Find menu does not display the image you assigned to it
6) Click on the document to close the menu
7) Right click on the document to display the popup menu again. You'll get the System.NullReferenceException
Thanks.
[Modified at 01/27/2007 03:45 PM]
1) You get a System.NullReferenceException when trying to display a popup menu that includes a BarTextBoxCommand. The exception occurs the second time you request the popup menu.
2) The image assigned to the BarTextBoxCommand through the image index property of the command does not appear on the popup menu either at design time or run time
Recreating the problem using the VB.Net sample project:
1) Open BarForm.vb in design mode
2) Edit the Quick Find command and add an image to it through the Image Index property
3) Bring up the Text Document Context PopupMenu and add the Quick Find command to the menu. Notice that the image you assigned to the command does not display. You can override the DisplayStyle for the commandlink, but that will have no affect
4) Run the project and launch the Bar Controls sample
5) Right click on the document in the tab to display the popup menu. The menu will display, but you'll notice that the Quick Find menu does not display the image you assigned to it
6) Click on the document to close the menu
7) Right click on the document to display the popup menu again. You'll get the System.NullReferenceException
Thanks.
[Modified at 01/27/2007 03:45 PM]