NullReferenceException using BarTextBoxCommand in PopupMenu

Bars for Windows Forms Forum

Posted 13 years ago by Rick - Developer, Visual Software Systems LLC
Version: 2.0.0078
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Avatar
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]

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rick,

1) Thanks for the repro steps. This is now fixed for the next maintenance release.

2) Actually this is by design. Custom controls such as textboxes are not intended to display an image.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 28 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.