On Aug 28, 2006, at 8:34 AM, Chuck Pelto wrote:

I've got a static text that is embedded in a rectangle control.
The static text has a NAME of "stQuestion".
What is the proper text to address that static text?
me.stQuestion  //where me is the rectangle control
...doesn't seem to work very well.

As noted by others, you always refer to the StaticText control directly by name.

When you say that the StaticText control is embedded in a Rectangle control, the proper term is that "the Rectangle control is the Parent of the StaticText control".

So, what does it mean when a control is the parent of another control? It means that the StaticText control behavior is affected in some way by the Parent. For example, if you set the Rectangle control "Visible" property to false, the StaticText control also disappears (but the StaticText.Visible property is still true). The same is true with Enabled and a number of other Control properties. Also if the Parent moves, all of the controls which are "children" of the Parent will move as well. In fact, I think that even children with LockLeft, LockRight, LockTop and LockBottom will resize/move when the parent changes sizes (not positive).

Now with ContainerControls, the rules change a bit. A control is actually embedded inside the ContainerControl and is *only* accessible by "drilling" down to the Control (like "Me.stQuestion").

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to