XPropertyTree is very beautiful,how to create a custom control using XPropertyTree?
thanks
Hi step8
You will find a good example in your installation ObjAsm\Projects\X\XPropertyTree.
Basically you need to create an XPropertyTree (Application.OnCreate) using:
OCall xbx::XPropertyTree.Init, xsi, [xsi].hWnd, offset XPT_Def
and all category and subcategory nodes, inserting them in the appropriate place in the tree.
When you initialise each of these, you specify the type of node and additional parameters such as selection data or a validation procedure.
mov pNodeCat, $New(XPT_CategoryNode)
OCall xbx::XPropertyTree.Insert, xax, NULL, XTVN_INSERT_AS_LAST_CHILD
OCall pNodeCat::XPT_CategoryNode.Init, xbx, hIconStrMain, $OfsCStr("Strings"), HEIGHT_LEVEL_1, XTVNS_EXPANDED
The rest is more or less standard application code. :biggrin:
Regards, Biterider
Thanks for quick reply.
I want to use this XTreeList in a C program,
If i use the code
OCall xbx::XPropertyTree.Init, xsi, [xsi].hWnd, offset XPT_Def
does it mean the whole project must programed in ASM?
I try to embed XPropertyTree in a dll,but compile failed.
Hi step8
Interfacing with C is more than just putting some code into a DLL.
For example, all the memory allocation and deallocation routines have to match perfectly, as well as calling conventions, data alignment, etc.
If your project is not too complicated and you will be using this GUI component, asm (ObjAsm) is the way to go.
Regards, Biterider
Thank you Biterider
Thanks for your great work :thumbsup: