I saw this post today by Xojo. I am curious what the “New RemoveControl method” is? Where can I find some docs on it?
Thanks,
Tim
I saw this post today by Xojo. I am curious what the “New RemoveControl method” is? Where can I find some docs on it?
Thanks,
Tim
It’s the complement method to AddControl, which allows you to add controls to a WebView at runtime.
So let’s say you want a new WebTextField that’s only around for a specific operation. You’d do something like this:
tf = New WebTextField
tf.Left = 100
tf.Top = 50
tf.Enabled = True
Self.AddControl(tf)
Have tf defined as a property or variable somewhere that you can use it later. Then, when you’re done with it:
Self.RemoveControl(tf)
Isn’t that what tf.Close
is supposed to do?
Sure. And under the hood it may just call tf.close
. But it’s a bit of syntactic sugar to balance the API and make it more consistent, if nothing else. Slightly bugged me that there was one and not the other just because I’m a little crazy like that. By contrast, IIRC, Mobile (iOS at least) has RemoveControl but not Close.