On Nov 29, 2006, at 3:43 PM, [EMAIL PROTECTED] wrote:
On Nov 29, 2006, at 20:41 UTC, Chuck Pelto wrote:
I'm running into a problem with the line of code....
if c.Window.Control(i).Parent is me then
Yes, I saw that too, and assume it was a minor flaw intentionally put
into the code to exercise the reader's brain. :) Just think about
what this code is doing, and replace "me" with whatever represents the
parent of interest.
And Parent is not a propertly of Control Class.
Good point; that's a slightly tougher flaw. You need to do something
like:
Dim ctl As Control = c.Window.Control(i)
if ctl IsA RectControl then
if RectControl(ctl).Parent is c then
Oops, I just gave away the answer to the first flaw!
Actually, I figured it out and then went on to implement your
suggestion of putting something in the OPEN function to do the job
once for the run of the app.
I sent an e-mail to that effect but it was bounced because, for some
strange reason, it looked like it had over 20K of material in it to
the listserv monitoring system.
At any rate, here is the final implementation code, once again....for
the first time....
// function to isolate the static text object within the
ResizeRelocRect
dim thisControl as Control
dim thisParent as Control
dim theStaticText as StaticText
if me.Window is nil then
return
end if
for i as Integer = 0 to me.Window.ControlCount - 1
if me.Window.Control(i) IsA StaticText then
thisControl = me.Window.Control(i)
thisParent = RectControl(thisControl).Parent
if thisParent is me then
stID = StaticText(thisControl) // stID is the property of
StaticText that holds the single StaticText item affiliated with the
ResizeRelocRect
Exit
end if
end if
next
_______________________________________________
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>