I am using a custom control… it basically is nested set of container controls with the lowest level being dynamic and added using EmbedWithin. [Note… I did not write this, but its pretty cool [StackControl 1.07 by Martin Trippese]]
What I need is to add some more event handling, Each of the embedded container controls can be customized any way you like… but what I need is to have each subclass be able to raise an event to pass a message to the application level somehow.
Could I create a global method [Sub gotTheMessage(msg as string)]
and somehow have each of those embedded classes call it some how?
Nobody have any insight on how to pass an event/message/data from a control (textfield, popup etc) on an embedded container control to the application level? I have dozens of embedded controls and each needs to pass information about its particular controls to a central routine to be processed.
Dave, do you mean like the Apple Pages property panel? So you select a text and get all the properties of the selected text in the property panel and can you change them?
Never seen that page… but this is taking the Property Inspector in your Stack demo and attempting to make it a working control. I have defined about a dozen specialized views (each for a different type of property) and I need to be able to populate from a external source, and then react in REALTIME when any control on any view is modified.
But yeah (I just fired up Pages), and its the same idea as the Xojo Property Inspector
Dave I will build you a small example in the course of the day, hoping that I have understood you correctly.
Just so that I understand it correctly and don’t work for nothing, it’s about you having a ListBox, for example, that shows objects with different properties. If you now select an entry in the ListBox, the correct dashboard should appear dynamically for it, in which you can change the properties of the selected object in real time, right?
to keep the terms straight… by LISTBOX I hope you mean STACKCONTROL (yours)
say I have a StackControl, and that stack control contains 3 Views (inserted using ADDVIEW, so a DYNAMIC window)
(for example, but not limited to )
View #1 has a textfield
View #2 has two buttons
View #3 has a slider
If Textfield is changed, OR either button is Clicked, OR the slider is moved, an event of some type needs to be exposed to the application.
I would like it to be a single “event” and not a specific event for every single control, something where I can send a “message” with embedded information
I built you a little example 56324 - RaiseEvent from an array of Controls (StackView). As Ivan suggests, the whole thing works through events.
For the demo I have recreated the Xojo Inspector for TextFields. Just select one of the three TextFields on the left side and its properties will be displayed on the right side, which you can change in realtime. You only have to replace the StackView folder with your licensed version!
I hope this helps. Send me a mail with a screenshot, as it looks in your program (I know what you’re working on)