Inside of a DesktopContainer, I would like to create a Dictionary that can be used by several of the container’s Controls in their Opening events. Is there a recommended place, a BeforeEverythingEvent inside the container to initialize the Dictionary? I tried the DesktopContainer’s Opening event, but it happens after the Controls’ Opening events. Color_dictionary is a property of the DesktopContainer.
Workarounds:
I settled on making one Control initialize Color_dictionary in its Opening event, but that is no guarantee it will always be the first Control to fire.
Or, every event that needs the Dictionary could just call the same method to initialize the Dictionary…
That’s a good idea. At this point the Container is a basic text editing area that can be dropped into a window. The color set is just the named color Xojo constants like Color.Red, but it could eventually be made to substitute its default colors with a set of colors that the app it’s living in sends to it.
i made similar and used a subclassed textarea for more features and context menu
because i need multiple textareas and reuse it.
a sub class is very useful because we can add methods and propertys to it.
i frequently use a sub class also for canvas or database.