开发者

Limit TreeView/ListView item edit characters

I have a TreeView and a list view controls that both supports edit their item nodes, but I want to limit them to 256 characters max, one way to do it, is to validate the Length of the string in the O开发者_Python百科nAfterLabelEdit, but what I want to do it make the edit box stop accepting characters when it reaches 256. same as

TextBox.Maxlength


There is no easy way to do that with TreeView/ListView items unlike with TextBoxes. You could either try TVITEM structure or this. Or you could capture the text changed event and validate...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜