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
244
issue with UltraTab Appearance.Image
posted

Our application sets the Appearance.Image property of an UltraTab if there is an issue with data on the tabbed page:

tab.Appearance.Image = System.Drawing.SystemIcons.Warning.ToBitmap()

I need to verify this, however the returned hashtable for the Appearance property does not include the "Image" key when it is valued. If the UltraTab has nothing for Appearance.Image it returns the key with a value of nothing as expected. It is only when Appearance.Image is valued that the key is not in the returned hashtable. Here's my code:

Dim TabAppearance As Hashtable = UltraTabControl().GetNAProperty("Tabs[0].Appearance")
Dim TabImage As Bitmap = TabAppearance.Item("Image")

All of the other properties like BackColor, ForeColor, etc. are all returned as expected and I can evaluate them.

I am using TestAdvantage 7.1. with RFT 7.0.1.3.

  • 5124
    posted

    Hello Jeff,

    Ammar looked into the GetNAProperty method and has cocluded that it cannot be modified to get the actual Bitmap object as RFT does not supply this information. 

    Therefore, his recommendation still holds, that you insert a verification point for the image.  This may be tricky, as the RFT Object Finder may not allow you to focus precisely on only the image, but it may force you to select a wider area like the tab header.  This may still be useful in your case; you will have to try that and see how it works for you.

    You can also call GetNAProperty("Tabs[0].Appearance.Image") to get the hashtable for the Image's properties.  This might provide enough information about the image for you to verify the image.

    Please let me know if this is helpful and/or if you have any further questions on this matter.

    Thanks,
    Francis

  • 6729
    Offline posted

    Hi,

    GetNAProperty is designed to deal with simple data types and Enum. unfortunately it does not support object data type (like image) nd that is the reason why the image property is removed from the hashtable when its not null.

    I think the best way to verify the image will be using an image verification point.

    Regards,

    Ammar