[Gambas-user] Killing objects? Urgent
Eilert
eilert-sprachen at ...221...
Wed Dec 21 18:13:21 CET 2005
Benoit Minisini schrieb:
>On Wednesday 21 December 2005 13:22, Eilert wrote:
>
>
>>Benoit Minisini schrieb:
>>
>>
>>>On Wednesday 21 December 2005 10:01, Eilert wrote:
>>>
>>>
>>>>I think I've got it. This way, it uses the .Delete method of the
>>>>TextBoxes themselves. Only after that, the array is cleared:
>>>>
>>>> FOR i = mTxt.Count - 1 TO 0 STEP -1
>>>> mTxt[i].Delete
>>>> NEXT
>>>> mTxt.Clear
>>>>
>>>>This seems to do what I wanted - is it correct, or will it crash one day?
>>>>
>>>>Rolf
>>>>
>>>>
>>>Clear() only clears the text inside the textbox. It is equivalent to do
>>>mTxt.Text = ""
>>>
>>>But Delete() effectively destroys the control.
>>>
>>>Wasn't the documentation clear ?
>>>
>>>Regards,
>>>
>>>
>>The documentation was clear, but I couldn't find how to kill the single
>>controls.
>>
>>What I tried first was just mTxt.Clear, which should clear the array but
>>did not kill the controls. But I didn't try mTxt[i].Clear as I clearly
>>saw the difference :-)
>>
>>So, is it ok the way it's shown above?
>>
>>Rolf
>>
>>
>>
>
>Yes!
>
>
>
Ok, good to know :-)
The question now is: How do I catch events from these controls?
They do not exist at design time, so I have to find out where the event
comes from and assign it to some SUB or FUNCTION...
Maybe I can do without, but if I had a chance to catch KeyPress and
Click events of the input controls, this would help a lot.
Rolf
More information about the User
mailing list