开发者

Programmatically show PropertyGrid active control's editing control

I'll try t开发者_JS百科o explain the effect I want to achieve. Basically, when user select a particular property (whose accepted values will be presented in a drop down) I'd like the dropdown to show IMMEDIATELY, without the need to click the drop down button. So far i'v been trying some weird/ugly solutions with no success (like trying to raise a MouseClick on the dropdown button...) so I hope there is a simpler/not-so-ugly one.


Add the following code to an event handler for the SelectedGridItemChanged:

if(e.NewSelected.Label == "Your Property Name")
{
  SendKeys.Send("%{DOWN}");
}

This sends an ALT+DOWN key press combination which will show the drop-down list of values for the property.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜