开发者

Visual Basic & Context Menu

Is there a way to add a Header to the popup menu? I don't find a pro开发者_运维技巧perty for this.


You could also simulate a header on the context menu by putting the information you want to display in the header as the first item in the context menu. Put a separator (or perhaps two) underneath it and put no code behind it.

That visually separates the item and users will learn pretty quick that clicking the first item doesn't do anything.


This may not work in your situation, but whenever I needed to show a context menu off of a grid row that wasn't the current/highlighted row, I made that row the current row first, then showed the menu. That would eliminate the need for a header on the menu. I assume you're showing the context menu if the user right clicks on the row. Well before showing the context menu, make sure that row is current and highlighted.


Do as Corin says, but disable the first item as well. If you disable it, that should remove confusion entirely.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜