Micro Focus QTP (UFT) Forums
How to get background color for individual days in SAPGUICalendar with QTP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to get background color for individual days in SAPGUICalendar with QTP (/Thread-How-to-get-background-color-for-individual-days-in-SAPGUICalendar-with-QTP)

Pages: 1 2


RE: How to get background color for individual days in SAPGUICalendar with QTP - AMirza - 01-13-2014

Can anyone show me how to use the following code as I can see the method GetDateTooltip for this object with Object Spy:

Code:
SAPGuiSession("Session").SAPGuiWindow("Year Overview 2010").SAPGuiCalendar("Calendar_2").Object.GetDateTooltip("selecteddate:=28/Dec/2010")


Currently I get blank value for the above code.

GetDateTooltip method is shown in Object Spy so I can use this but the issue is how to use the method with the right values in the bracket.

Would appreciate someones expertise on this subject.


RE: How to get background color for individual days in SAPGUICalendar with QTP - AMirza - 01-15-2014

Hi All,

I have resolved this issue by using the code the following way:

Code:
Dim tr

SAPGuiSession("Session").SAPGuiWindow("Year Overview 2005 RR0").SAPGuiCalendar("Calendar").setDate "3/Jan/2005"

tr = SAPGuiSession("Session").SAPGuiWindow("Year Overview 2005 RR0").SAPGuiCalendar("Calendar").GetROProperty("StartSelection")

msgbox SAPGuiSession("Session").SAPGuiWindow("Year Overview 2005 RR0").SAPGuiCalendar("Calendar").Object.GetDateTooltip(tr)

msgbox SAPGuiSession("Session").SAPGuiWindow("Year Overview 2005 RR0").SAPGuiCalendar("Calendar").Object.GetColor(tr)

The above code gives me the correct values for any dates selected with SAP GUI Calendar object.

Thank you to all those that have tried to help with this issue.


RE: How to get background color for individual days in SAPGUICalendar with QTP - supputuri - 01-16-2014

Good ... and thanks for posting the solution.