[Vala] Widgets hierarchy, or how get label on the bix?



Hi all,
please, tell me somebody, is possible in the vala to get access to one
widget trough another one?
To be clear: I have a box and one label on it:

    var box = new Box(...);
    var label = new Label(...);
    box.pack_start(label, ...);

and now I have to get access to this label using the box:

    box.label.get_text() // or something like that.

Or more clear:

    public void set_box(Box box) {
        string label_title = "Hello, Vala!";
        box.label.set_text(label_title);
    }

How can I solve this?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]