On Apr 5, 2007, at 3:23 PM, Nate Lowrie wrote:

> I could have sworn I've done this before.  Suppose I have a custom
> panel class.  Its parent may or may not be a form.  Now, I want to
> access an object that is not sitting on the panel by regID.  I know
> that there is a way of doing this I just don't remember how.

        RegIDs have no meaning outside of the context of a form. For that  
reason, they are not a good choice for sub-form-level classes. Think  
about it: if you gave a control in your panel class a RegID, and then  
used 3 of these panels in a form. There would be duplicate RegIDs,  
and would make their use meaningless.

        Instead, give the items meaningful Name values. Names only have to  
be unique among siblings of the same parent, so from your panel you  
can reference them by: self.txtFirstName, self.txtLastName, etc.,  
assuming that those are the names you've given to your textboxes.


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to