Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 07 JUN 1999 11:49:00AM Dan Manning wrote:

 When you are in a form, how do you obtain a list of controls in another form?
 I tried to use "OBJECTLIST" from the Utility function.  The code is:
    Declare Function Get_Property, Utility
    Window_Name=Get_Property(@Window:'.WINDOW_NAME','TEXT')
    Control_Names=Utility('OBJECTLIST',Window_Name,'')

The value appears in Window_Name, but Control_Names is empty. When I change Window_Name to @Window, the controls for the current window are returned. It appears that Utility will only return the list of controls for the current form.

   I also tried 'CTRLMAP' from Get_Property.  It also returns null when trying to get the controls for a form other than the current form.

At 07 JUN 1999 01:18PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:

I'm not exactly sure what you are doing. Do you know the name of the window or are you reading it from another field? Looking at the code, it seems like you have a field in the current window called WINDOW_NAME. This field's TEXT property contains the name of another window. You are then trying to find the controls in this second window.

If so, what you are doing should work. If not, you are getting the obeject list of whatever the text property of @WINDOW.WINDOW_NAME.

akaplan@sprezzatura.com

Sprezzatura Group

www.sprezzatura.com_zz.jpg


At 07 JUN 1999 03:15PM Chris K wrote:

Is the form you are trying to get controls from opened? I use "ctrlmap" property and it works fine on opened forms. Try to open the form first (invisible if you do not need to see it) and try the code again.

Chris.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/0eec8418849a6f5a852567890056e288.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1