|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 2 of 2 total|
|Custom Component With Nested Layouts - ARGH!!|
|Fri, Jun 2 2017 8:15 AM||Permanent Link|
I am trying to enhance an existing custom component by adding some more elements. In order to do so I need some of the existing elements to become children of a new container element so that my overall layout works correctly. Try as I might I cannot get this to work properly.
I seem to remember that there is a rule about the order of element creation within the CreateInterfaceElements override such that it needs to match the corresponding element Layout indexes? Is this still the case and, if so, how does one arrange this in a nested-layout scenario like this one?
|Mon, Jun 5 2017 8:14 AM||Permanent Link|
So, it turns out, with a fresh pair of Monday-morning eyes and a large coffee, that the answer lies with the additional parameters of the CreateElement function:
function CreateElement(const AName: String; AParent:
TElement=nil; const AClassName: String=ELEMENT_CLASS_DIV;
AContainer: Boolean=False; AEvents: Boolean=False; ADynamic:
I simply had to specify the AContainer parameter and AParent parameters accordingly and everything appears to have worked. As per usual, Mr Young seems to have thought of everything.
Tim - is this correct - seems to be?