I'm trying to write a GUI with the following structure (only relevant parts):
Window -> VBox -> HBox -> Frame: Input
-> ScrolledWindow 开发者_如何转开发-> TreeView -> ListStore: Output
As soon as the input is received, a list will we computed that is the output. How do I send this list to the ListStore so that it will be displayed? Do I need to drag references of the parent element along in every element? Or is there an easier way?
You can just keep references of your input and your output, then do the following:
- bind a method to your input, that will be called on update or validation,
- in this method, do the treatment needed,
- at the end of this method, update your output, directly using its reference and its internal functions (configure or else).
There maybe a better way to do it (using Var classes?) but that's how I would do it.
精彩评论