[fxruby-users] fxruby and framecontrole
lyle at lylejohnson.name
Wed Dec 12 18:21:33 EST 2007
On 12/12/07, Ernst J. Tanaka <ernst at tanakasite.com> wrote:
> My question is how do I reset righttopframe and rightbottomframe after
> handling treeitem(1) and before click on the next item.
I think the important question is what you mean by "reset". Acually, a
question very similar to yours came up the other day on the mailing
list; here's a link to the first post in that thread:
My advice in that thread was to just update the values associated with
the widgets (if possible) instead of removing and re-creating them.
For example, suppose the top-right frame contains three widgets. You
can update their values by simply setting new values for their text,
on click treeItem
button.text = "New button text"
label.text = "New label text"
textfield.text = "New text field text"
You can do something similar to update the contents of the
bottom-right frame at the appropriate time.
If, however, you really do need to get rid of the widgets in the
top-right frame, use removeChildren() and not destroy(), e.g.
parent = righttopframe.parent
Note that this won't set righttopframe to nil, so you need to be
careful not to use that value anymore until you assign some new value
Hope this helps,
More information about the fxruby-users