[Gambas-user] How to get rid of an object

Eilert eilert-sprachen at ...221...
Mon Dec 19 16:43:24 CET 2005


I want to build a dynamic input mask showing TextBoxes and stuff 
accordingly to what the user clicks on.

So I produce some objects, this is an example code:

PRIVATE mTxt AS NEW Object[]

'Testcode
DIM tt AS TextBox
  IF mTxt.Count < 1 THEN
    tt = NEW TextBox(Maske)
    mTxt.Add(tt)
    mTxt[0].X = 10
    mTxt[0].Y = 10
    mTxt[0].Text = "hallo"
   
    Maske.Index = 2
    tt = NEW TextBox(Maske)
    mTxt.Add(tt)
    mTxt[1].X = 10
    mTxt[1].Y = 10
    mTxt[1].Text = "hallo 2"
   
  END IF
 
'Testcode Ende

Up to here no problem, two new TextBoxes appear as desired. But when the 
user clicks on another element, the TextBoxes are to disappear, and when 
the user re-enters this kind of element, the whole array has to build up 
from scratch to avoid confusion in numbering and managing the input 
elements.

To have a start, i just inserted

    mTxt.Clear

into another SUB which handles another kind of element, but the 
TextBoxes do not disappear.

What can I do?

Thanks for all ideas!

Rolf





More information about the User mailing list