[Gambas-user] Accessing control in different form
    Rob 
    sourceforge-raindog2 at ...94...
       
    Tue Aug 12 16:29:54 CEST 2003
    
    
  
On Tuesday 12 August 2003 04:21, Benoit Minisini wrote:
> Contrary to VB, Gambas classes can not refer to an automatically
> instanciated object.
They can, though.  If you put this into FSecond:
dim x as object
dim y as object
x = me.parent
for each y in x.children
	y.hide
next
it will hide all the controls on FMain.  It's just impossible to figure out 
which is which or refer to them directly as x.WidgetName.  Adding a Name 
property to every widget would at least let us write things like
function GetParentWidget(wid as String) as Object
	dim x as object
	dim y as object
	x = me.parent
	for each y in x.children
		if y.name = wid then return y
	next
end
Rob
    
    
More information about the User
mailing list