Forum Discussion

lbyrne's avatar
10 years ago


I have a toolstrip object called frmAuthorizations.tspAuthorizations

 When the screen first appears,  I can refer to the toolstrip items by name

frmAuthorizations.tspAuthorizations.ClickItem("New Add a new authorization")

After the above operation occurs, the same toolstrip item changes to a different icon and becomes a cancel button. I can no longer refer to this item by the same name. Both the add and the cancel are at index 2. How can I do a clickitem when it is a cancel button. I tried using the wButtonID  but that did not work. What am I doing wrong?

2 Replies

  • I was able to finally to get it to work.

    I used the wButtonText to determine the index of the Cancel button.

    Then I was able to do the clickitem
  • mdh's avatar
    you CAN also manually create the namemapping (if this is used at all) OR ask the developer to give each window a different 'window' name (this will not affect the actual application)