Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
UltraTab Control
posted

Hi ,

We are using RFT 8.0 (VB.Net 2005 Framework)
We have a requirement to work on UltraTab Control which our application uses as Sticky Notes on Desktop

Following are the my requirements
 Find the Tab Highlightened
 Find the Tab Text
 Double click on The Tab
 Find the Notes under the Tab
 Delete a Tab

Could anyone please provide the code snippet for the above req.

Attached is the sample document for more Info

 

Thanks in Advance

Parents
No Data
Reply
  • 6729
    Suggested Answer
    Offline posted

    Hi,

    Sorry for the late replay but somehow this thread got buried in my inbox. Below is some code snippet for the action you described

     Find the Tab Highlightened

    MsgBox(UltraTabControl1TabbedPage().GetNAProperty("SelectedTab.Text").ToString())


     Find the Tab Text

    MsgBox(UltraTabControl1TabbedPage().GetNAProperty("Tabs[0].Text").ToString())

     Double click on The Tab

    UltraTabControl1TabbedPage().DoubleClick(AtText("tab2")) ' By its Text

    UltraTabControl1TabbedPage().DoubleClick(AtPosition(2)) ' By its Index


     Find the Notes under the Tab

    This will depend on the type of control you have for the notes and the structure of it inside each tab, for example if your notes are actually UltraTextEditors and placed directly under inside the tab then you can do something like this to get the text of the text editor:

    Dim FoundTestObject() As TestObject = UltraTabControl1TabbedPage().Find(AtDescendant(".class", "Infragistics.Win.UltraWinEditors.UltraTextEditor", "Name", "ultraTextEditor1"))

    Dim TextEditor As Infragistics.RFT.NetTestObjects.UltraTextEditorTestObject = FoundTestObject(0)

    MsgBox(TextEditor.GetText())

     
     Delete a Tab

    The TabControl does not support deleting a tab via its UI, so if your application has some custom way to do this (like Right Click the tab and select Delete from a context menu) you could do something like:

    UltraTabControl1TabbedPage().Click(RIGHT, AtPosition(0))

    ' Selct Delete from the context menu ...

     

    I hope this was helpful

     

     

     

Children
No Data