How can i check whether a toolbar menu exist or not.
If the toolbar menu doesnt exist or if the toolbar menu is disabled, i need to throw an error message.
Can someone help me on this issue, please
Regards,
tinu
Tinu,
You can get a reference to a particular tool by means of code like this:
Dim tooltool = SwfWindow("Testing Ribbon").SwfToolbar("_Form1_Toolbars_Dock_Area_Top").GetNAProperty("Ribbon.Tabs[0].Groups[0].Tools[3].Tools[1]")MsgBox(tool)
You can loop through the Tools in a Group (or another Tool) and save the Keys of the tools and then search for the Key that you are looking for.
Let me know if this helps.
Hi Michael,
Thanks for the reply. I tried that piece of code. But its throwing the following error.
Invalid Property name: Property [Tools] not found
Line (3): "tool= SwfWindow("Test_Window").SwfToolbar("_MdiHost_Toolbars_Dock_Area_To").GetNAProperty("Ribbon.Tabs[0].Groups[1].Tools[3].Tools[1]")".
The Code tool= SwfWindow("Test_Window").SwfToolbar("_MdiHost_Toolbars_Dock_Area_To").GetNAProperty("Ribbon.Tabs[0].Groups[1].Tools[3].CaptionResolved") returns the name of the particular item.
But my requirement is to check whether that particular item is enabled or not. Could you please check it for me ASAP?
Tinu
You should be able to get that information with something like this:
Dim tool1tool1 = SwfWindow("Testing Ribbon").SwfToolbar("_Form1_Toolbars_Dock_Area_Top").GetNAProperty("Ribbon.Tabs[0].Groups[0].Tools[3].Tools[1].EnabledResolved")MsgBox(tool1)
Let me know if that works for you.
Did you try that? Let me know if it worked.
Am trying to reterive the items from the SwfToolbar but getting the error "Member group not valid"
I tried SwfWindow("Dash").SwfToolbar("Form").GetNAProperty("Ribbon.Tabs[0].Group[0].Tools[0]")
I have attached the screenshot of the same. Kindly look into the and advice me the code to reterive the meny items(Am interested in checking SR-Dash Options, Logout, send chat transcripts to clipboard)
Thanks
Nooruddin
Nooruddin,
I suggest that you use the GetContent method. This method takes a string for the key or a number for the index of a toolbar and returns the captions of the tools within the toolbar in a list that is delimited by a new line. That should give you what you want. Let me know if you have further questions.
Hi,
Try using
checked = obj.getItemProperty(item,checked).
This returns a binary value or a boolean value indicating the item in swftoolbar is checked or not. Let me know if it worked.
thanks for the info...
wordpress mobile themesmobile templates wordpress mobile theme