mercredi 21 décembre 2016

Accessing a Components Property prior to the Instantiation

I have the following problem: I have a list of Components, that contain Rectangles with a width of either 200 or 800. I'd like to filter this list, and only create objects of the Rectangles with a width of 200 as I work on a small screen.

Preferably I do not want to create all objects, check their width, and destroy those with the wrong width again. For obvious reasons I really only want to create those with a width of 200.

To do this I would need to aquire knowledge of the width, before I instantiate them. As far as I have seen, there is no publicly available and documented way of introspecting/reflecting the Component prior to it's instantiation.

My question is: Is there a non-public way to gain knowledge about what is packaged inside of my Component?





Aucun commentaire:

Enregistrer un commentaire