Help on dynamically creating UI elements based on XML data required
-
Hello Can anyone direct me to a resource where I can see working demo(s) / samples highlighting HOWTO dynamically create a user interface from a XML data definition. What I mean is this: There will be one or more XML data files which will actually contain information regarding controls to be drawn. A program will read those XML files and dynamically create the defined controls. Hence, if the XML reads something like:
....
<Button>
<ID>CommitPatchButton</ID>
<Caption>Complete task</Caption>
<Style>Flat</Style>
</Button>
....Then our program should create the button which is associated with the ID 'CommitPatchButton' with the defined specifications. Ofcourse, the XML definition will ONLY define UI Elements and their visibility (for instance,if the button should be made visible or not). The code associated with the controls will be already present beforehand. Thus, in our case, if the above button is defined as visible in the XML data, then we will draw it as specified, and to user will be able to use the functionality associated with it. Ideally a VC++/MFC solution will do, though, it's a working implementation that's more neccessary, so that I can grasp the idea quickly. Otherwise, if you have a brilliant whitepaper/article/layout to achieve the goal (but with the code lacking..), send it(or a link to it) to me anyways ! Note: No business quotations please. Regards Kamal Shankar "God then made two great lights; the greater light to rule the day, and the less light to rule the night" - Genesis 47:3
-
Hello Can anyone direct me to a resource where I can see working demo(s) / samples highlighting HOWTO dynamically create a user interface from a XML data definition. What I mean is this: There will be one or more XML data files which will actually contain information regarding controls to be drawn. A program will read those XML files and dynamically create the defined controls. Hence, if the XML reads something like:
....
<Button>
<ID>CommitPatchButton</ID>
<Caption>Complete task</Caption>
<Style>Flat</Style>
</Button>
....Then our program should create the button which is associated with the ID 'CommitPatchButton' with the defined specifications. Ofcourse, the XML definition will ONLY define UI Elements and their visibility (for instance,if the button should be made visible or not). The code associated with the controls will be already present beforehand. Thus, in our case, if the above button is defined as visible in the XML data, then we will draw it as specified, and to user will be able to use the functionality associated with it. Ideally a VC++/MFC solution will do, though, it's a working implementation that's more neccessary, so that I can grasp the idea quickly. Otherwise, if you have a brilliant whitepaper/article/layout to achieve the goal (but with the code lacking..), send it(or a link to it) to me anyways ! Note: No business quotations please. Regards Kamal Shankar "God then made two great lights; the greater light to rule the day, and the less light to rule the night" - Genesis 47:3