Ultrabutton and VK_LControl/VK_RControl
- 9 years ago
Hi,
The reason of the problem is that you are mixing two approaches and they do not work together. You are trying to multi-select grid rows by pressing the Control key (end-user action) and then call some grid's internal method (.set_selected() - non end-user action). Most probably, .set_selected() does not do something (set some property, call some method, etc.) that is used by the code that is called on OK button press.
I would recommend to search/check how to click the needed row (it might be something like grid.rows.item(cint(ri)-1).Click) and replace the line with the call to the .set_selected() method with the line(s) that perform a click on the row.
If you fail to find how to click grid's row, then you should examine the list of available grid's methods more carefully - maybe you'll need to call some other method or call two or more methods.
Also, you may search TestComplete's help and samples, as well as this forum for the name/class name of the grid you are working with - there is a chance that you will find a relevant code sample.