On Jun 19, 2006, at 1:13 PM, Russ Jones wrote:


On Jun 19, 2006, at 2:49 PM, Chuck Pelto wrote:

<snip>
The question remains, how do I access a control element, such as an EditField with a Control Class object?

Regards,

Chuck


Hi Chuck.

I put two editfields and a pushbutton in a new window.

In the pushbutton action method, I put

  msgbox "Control Count = " + str(ControlCount)

  dim e as EditField
  dim i as integer

  for i = 0 to ControlCount-1
    if Control(i) isa Editfield then
      e = EditField(Control(i))
MsgBox "Control(" + str(i) + ") Isa EditField that contains " + e.Text
    end if
  next

and it seems to work ok for me.

Hope that helps.

Ach tso!

So after determining I'm looking at an EditField control I say something to the effect....

efControl = EditField(Control(i)) // where i is the control's INDEX number; which I can get with a call like i = theControl.Index(), theControl is derived from theControl = theWindow.Control(itCount) // itCount is the iteration of checking each control in the window.

        theText = efControl.Text()

Would efControl have to be dim'd as an EditField? And every other type of control dim'd as it's specific type of control?

Regards,

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