Hi Charles,

I guess that will work, but it strikes me as being a very code intensive way of doing it.

How about another idea? One not so cumbersome?

If I have a name of the StaticText (ST) object that is a child of the (thanks to your code example earlier this year) ResizeableRelocatableRectangle (RRR), can I cast that into a ST object I can work with?

I've got about 6 such rectangles with an ST object inside of each. Going through all those objects each time the mouse enters any one of them is cumbersome.

If figure that if I know the name of the ST object based on the name of the RRR, I should be able to identify that ST object and set that to a generic ST property in the RRR. Then I can manipulate it as the RRR is being manipulated.

My challenge is trying to figure out how to cast a string with the name of the ST object to be loaded into the property.

Things like....

  rectName = me.Name // get name of control

  stName = "st" + Mid(rectName, 5, Len(rectName))

  stAccess = StaticText(Control)stName

....just don't seem to get it. And I can't find any good examples of what I'm trying to do up in the Archive.

Regards,

Chuck
P.S. I've put in some feedback to REAL Soft about finding All My Children as a property of RectControl objects.


On Nov 29, 2006, at 10:13 AM, Charles Yeomans wrote:

There isn't one; you'll need to implement it yourself.  For example --


Function Children(c as RectControl) as RectControl()
  dim theList(-1) as RectControl
  if c.Window is nil then
    return theList
  end if
  for i as Integer = 0 to c.Window.ControlCount - 1
    if c.Window.Control(i) IsA RectControl then
      if c.Window.Control(i).Parent is me then
        theList.Append c.Window.Control(i)
      end if
    end if
  next
  return theList
End Function

Charles Yeomans


On Nov 29, 2006, at 12:01 PM, Chuck Pelto wrote:

What is the call that will identify all the child objects inside of a control?

I see where child objects can find their parent object. But not the other way around.

Regards....

_______________________________________________
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>


_______________________________________________
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