SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    ActiveX Tree Object

    Hi,

    I am having an ActiveX Tree object in my application, and i want to select one particular node, which i am passing through the excel file.

    Is there any way to do it.... Or Is there any way to get the runtime coordinates of the particular node which could be passed to the clicl or dbclick event.

  2. #2
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    Depends on how the object is recognized...if its recognized just a ActiveX object then you can use .object. to get the internal methods of the ActiveX tree and then use those function

  3. #3
    Junior Member
    Join Date
    Sep 2006
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    Yeah, It is identified as ActiveX Object but by using .object it does have any methods that could be used to identify the particulat nodes of the tree

  4. #4
    Junior Member
    Join Date
    Sep 2006
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    for winobjects for example we are having methods like GetVisibleText and GetTextLocation, do we have any other similar methods for ActiveX Objects

  5. #5
    Senior Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    593
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    GetVisibleText and GetTextLocation works fine for ActiveX. However they will run only on MS Win2000 and prly XP.

    Hope this helps
    Vengat Ramanan.R

  6. #6
    Junior Member
    Join Date
    Sep 2006
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    This methods are not shown for the ActiveX objects, they exists only for the WinObjects, can u give a code example for this...

  7. #7
    Senior Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    593
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object



    Function SpyUltraGrid(acxname,nativeclass,progid,TextToFind )
    TextToFind=""&TextToFind&"" '''This is the data we search for
    FoundText=0
    Set GetUltraGrid=Description.Create()
    GetUltraGrid("acx_name").Value=acxname '''''Get the acx_name with object spy
    GetUltraGrid("nativeclass").Value=nativeclass'''Ge t nativeclass with Object Spy
    GetUltraGrid("progid").Value=progid'''Get progid with Object Spy
    TextOnGrid=Browser("").Page("").ActiveX(GetUltraGr id).GetVisibleText
    If Instr(Trim(TextOnGrid),Trim(TextToFind))<>0 Then
    msgbox Mid(Trim(TextOnGrid),Instr(Trim(TextOnGrid),Trim(T extToFind)),Len(TextToFind))
    If Mid(Trim(TextOnGrid),Instr(Trim(TextOnGrid),Trim(T extToFind)),Len(TextToFind))=TextToFind Then
    FoundText=FoundText+1
    End If
    End If
    If FoundText>0 Then
    Reporter.ReportEvent micPass,"Test Pass","The Searched Text "&"'"&TextToFind&"' was found"
    Else
    Reporter.ReportEvent micFail,"Test Fail","The Searched Text "&"'"&TextToFind&"' was not found"
    End If
    End Function


    Call SpyUltraGrid(acxname,nativeclass,progid,TextToFind )
    Vengat Ramanan.R

  8. #8
    Senior Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    593
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    Function SpyUltraGrid(acxname,nativeclass,progid,TextToFind )
    TextFound=0
    TextToFind=""&TextToFind&"" '''''TextToFind is the string we search for
    On Error Resume Next
    Set GetUltraGrid=Description.Create()
    GetUltraGrid("acx_name").Value=acxname '''''Get the acx_name with object spy
    GetUltraGrid("nativeclass").Value=nativeclass'''Ge t nativeclass with Object Spy
    GetUltraGrid("progid").Value=progid'''Get progid with Object Spy
    lef=-1
    top=-1
    righ=-1
    bottom=-1
    Text=Browser("").Page("").ActiveX(GetUltraGrid).Ge tTextLocation(TextToFind,lef,top,righ,bottom)
    If Text Then
    Reporter.ReportEvent micPass,"Test Pass","The Searched Text "&"'"&TextToFind&"' was found"
    Else
    Reporter.ReportEvent micFail,"Test Fail","The Searched Text "&"'"&TextToFind&"' was not found"
    End If

    End Function

    Call SpyUltraGrid(acxname,nativeclass,progid,TextToFind )

    Regards
    Vengat Ramanan.R

  9. #9
    Junior Member
    Join Date
    Sep 2006
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    Does the GetTextLocation return the co-ordinates of the particular text???

  10. #10
    Senior Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    593
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ActiveX Tree Object

    Yes but the co-ordinates it gives arent X and Y. So you have to do some work on getting those values to correspond to some x,y.
    Vengat Ramanan.R

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 07:57 AM.

Copyright BetaSoft Inc.