SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to Get Components In Order of Appearance

    How can you get the contents (window references to all of controls) of a panel in SilkTest in the order they appear on screen.

    I have experimented with GetContents and GetChildren but these both don't work the way I want it to. I want to be able to get a reference to each component in a panel but I want them to be returned to me in order thery appear on the screen.

    GetContents will return all the items in the correct order but only as a list of strings, not references to the actual objects.

    GetChildren will return references but in a weird order. It will return them in the order they were declared and then put all the undeclared stuff at the end.

    Does anyone know a way to do this? I was thinking of using the getContents method to get the correct order and then possibly use something else to get the components.


    Thanks.

    ------------------

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Get Components In Order of Appearance

    Could you explain why appearance order is important?


    John



    ------------------

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Get Components In Order of Appearance

    Becasue i want to check the order components appear in.....

    ------------------

  4. #4
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Get Components In Order of Appearance

    Use GetChildren and then call GetRect for each one and sort them that way.

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  5. #5
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Get Components In Order of Appearance

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by DJGray:
    I chuckled a bit as I thought about John's expression at that response.
    <HR></BLOCKQUOTE>

    Well, surprise at the complete lack of clarity in the response was my first reaction.

    Then Jame's comment puts a completely different spin on it.



    John


    ------------------

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Get Components In Order of Appearance

    I chuckled a bit as I thought about John's expression at that response.

    What if one were to go to the page in question and use the GenerateDecl method and then get the index of each object of the type you wanted.

    I've not tried this, but it was the first thing that came to my mind once I was done laughing.

    ------------------

  7. #7
    Junior Member
    Join Date
    Jan 2003
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to Get Components In Order of Appearance

    Thanks james, the GetRect method worked.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:19 PM.

Copyright BetaSoft Inc.