开发者

Win32 textBox in treeview

开发者 https://www.devze.com 2022-12-23 20:55 出处:网络
I want to add textbox in treeview as child of one of the parent node. Is it p开发者_如何学运维ossible> If yes how to achieve this?The native TreeView control isn\'t going to be helpful at all to make

I want to add textbox in treeview as child of one of the parent node. Is it p开发者_如何学运维ossible> If yes how to achieve this?


The native TreeView control isn't going to be helpful at all to make this work. Programming one yourself is a tricky proposition. It is however a very popular UI gadget. Any component vendor sells one, invariably called "TreeList".

You'll have to do some shopping if you want to use such a component from unmanaged C/C++. An ActiveX version of such a control is as close as you can get. Most component vendors have however put that in their legacy bag.


Depending on your requirements, you may be able to use the built-in label editing features of the Win32 tree view. See TVM_EDITLABEL.

To make an item act like an edit control, you could send this message yourself when the item is clicked. You could also use owner-draw techniques to make the item look more like an edit control when it isn't in label-editing mode.

0

精彩评论

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

关注公众号