[Gambas-user] My solution for missing properties

R Onstenk ronstk at ...239...
Fri Sep 12 14:01:05 CEST 2003


Missing the Index, Name and other properties in Gambas regular VB users
have and are missing here.

Wel the .Tag property in Gambas is more powerfull then his counterpart.
In the .Tag documentation you can find that the .Tag property is a variant!.
In the other one it's only text you can use.

After reading about variant in the .Tag I did try to put a button
on the form and button (the handle is the variant) in the .tag property.

 TextBox1.Tag = New Button(ME)

It worked and I could use it to position the button.

  TextBox1.Tag.move(20,20)

Very nice. This is in VB terms a stuppid thing to do. But see it as the
TextBox.Tag is like a variable AS Button for the button. In VB typed as

  dim btn as Button
  set btn = Button1
  btn.move 20,20

Why is this so nice?
Well if you can do this it can also posible to put a collection in it.
The key can be then used as the mising property "name" etc.

A Collection is just like a associative array, Gambas array's are for
different datatypes with nummerical index only.


Also handy to add other user made properties.



More information about the User mailing list