[Gambas-user] Index
Rob
sourceforge-raindog2 at ...94...
Wed Jan 21 04:14:34 CET 2004
On Tuesday 20 January 2004 20:47, Rizky Tahara Shita wrote:
> >Your client can use the Tag property intelligently, and the
> > FOR EACH instruction on Container.Children, and maybe he
> > won't need 95 lines of code. I think its application may be
> > not well written :-). These 90 textboxes must have something
> > in common!
> well... can you guys give an example ??
> i'm still confuse with group and tag property here...
I think Benoit means something like this:
1. when adding your textboxes (or whatever) to the form, set the
Tag property to, say, whatever you would have set the Index
property to in VB.
2. in your code, write something like this: (I haven't tried
this because I don't have access to my client's
too-many-textboxes project...)
public Textboxes as Collection
...
' following goes in Form_Open
dim tb as object
for each tb in me.children
if tb.tag > 0 then Textboxes.add(tb,tb.tag)
next
I have to admit I never considered this possibility, and would
have suggested it to their VB programmers if I had.
Rob
More information about the User
mailing list