Posted 18 years ago
by Chien A.
Version: 2.0.91
Platform: .NET 2.0
Environment: Windows Vista (32-bit)
This one gave me a real headache tracking down...
Attempting to set the text of a commandlink hosted on a PopupMenu (such as updating text for a command that toggles between 2 modes) during the CommandUpdate event of the BarManager causes the context menu to flash briefly in the top-left corner of the screen on popup, and more importantly also causes the currently focused toolwindow/window to become unfocused - which effectively breaks all context/selection specific updating.
Can be replicated by inserting:
If e.Command.FullName.Equals("Edit.Copy") Then
e.CommandLink.Text = e.Command.Text + " Test"
End If
into the barManager_CommandUpdate handler of barForm.vb in the demo project (minimise MDI window so you can see the window frame lose focus).
[Modified at 07/09/2007 12:41 AM]
Attempting to set the text of a commandlink hosted on a PopupMenu (such as updating text for a command that toggles between 2 modes) during the CommandUpdate event of the BarManager causes the context menu to flash briefly in the top-left corner of the screen on popup, and more importantly also causes the currently focused toolwindow/window to become unfocused - which effectively breaks all context/selection specific updating.
Can be replicated by inserting:
If e.Command.FullName.Equals("Edit.Copy") Then
e.CommandLink.Text = e.Command.Text + " Test"
End If
into the barManager_CommandUpdate handler of barForm.vb in the demo project (minimise MDI window so you can see the window frame lose focus).
[Modified at 07/09/2007 12:41 AM]