Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Custom Component With Nested Layouts - ARGH!!
Fri, Jun 2 2017 8:15 AMPermanent Link

Mark Brooks

Slikware

Avatar

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?

Cheers
Mark
Mon, Jun 5 2017 8:14 AMPermanent Link

Mark Brooks

Slikware

Avatar

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:
     Boolean=False): TElement

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?

Mark
Image