jsayre
12 years agoOccasional Contributor
Microsoft ToolStrip and button interaction
I am trying to code a test that interacts with some Microsoft ToolStrip objects and detects some of their properties. So far, I have been rather unsuccessful with doing this.
I am using JScript and using the following logic:
When I run this test, It just tells me that the object is not checked regardless of the objects actual state. If i run the ClickItem command on it's own, it works fine; Clicks the correct object.
I have tried several other methods of identifying this object and its state as well and I am out of ideas.
Any suggestions?
I am using JScript and using the following logic:
if(Aliases.Program.frmMain.ToolStripContainer1.ToolStripContentPanel.tStripOuter.ToolStripPanel.ProgramToolStrip.wChecked(3))
{
Log.Message("The viewer is turned on. We are going to turn it off");
//Clicks the 4th item of the 'ProgramToolStrip' bar.
Aliases.Program.frmMain.ToolStripContainer1.ToolStripContentPanel.tStripOuter.ToolStripPanel.ProgramToolStrip.ClickItem(3);
}
When I run this test, It just tells me that the object is not checked regardless of the objects actual state. If i run the ClickItem command on it's own, it works fine; Clicks the correct object.
I have tried several other methods of identifying this object and its state as well and I am out of ideas.
Any suggestions?