How to not drop-down combobox every time data is read from it?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2010
10:39 AM
02-23-2010
10:39 AM
How to not drop-down combobox every time data is read from it?
Every time I try to obtain wItemCount or wItem the combobox drops down, I don't see why it needs to do this every single time. I can use the object browser to get all of this data without seeing the drop down come down once.
Is there something I need to do to stop it from dropping down the list every time? Dropping down the list every time significantly slows down the time it takes my script to complete.
Thanks
Is there something I need to do to stop it from dropping down the list every time? Dropping down the list every time significantly slows down the time it takes my script to complete.
Thanks
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2010
12:42 AM
02-25-2010
12:42 AM
Hi Ted,
This behavior is normal. There are combo boxes that build the entire list of items only when expanding, so to be sure that the items of your combo box are recognized, we expand a combo box (when using wItemCount and wItem from script).
If this is annoying for you, you can use native properties to get access to items of your combo box. For example, you can use the ItemCount and Items native properties:
// Our sample application - Orders (Delphi):
// "C:\Users\Public\Documents\TestComplete 7 Samples\Open Apps\OrdersDemo\Delphi"
// Run exe, select "Orders | New order..." and run the following script
var combo = Sys.Process("Orders").VCLObject("OrderFrm").VCLObject("Product_ComboBox");
for (var i = 0; i < combo.ItemCount; i++) {
Log.Message(combo.Items.Strings(i));
}
--
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2010
10:48 AM
03-11-2010
10:48 AM
There has got to be a way to not do drop down these boxes every time. It takes up valuable time and is very annoying. I want the static data. I don't believe our application supports the methods you suggested, because I can't figure out a way to get them to work. Like I said previously, I can pull up the object browser get all of the necessary information and the drop down never every comes down, so why is it necessary during my script to do so. Has a workaround I tried the example given in the Help to get the Combobox items using wItemList thinking I could use the item list data to do the checks I need to do before selecting an item, but even that resulted in the drop down coming down 3 times.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2010
06:49 AM
03-18-2010
06:49 AM
Hi Ted,
I don't believe our application supports the methods you suggested
Did you compile your application with debug info? If you didn't, please do this by using instructions from the "Open Applications in Delphi" help topic.
If your application is compiled with debug info, please use the Object Browser to check whether your check box controls have necessary properties (see the "Object Browser Overview" help topic).
Best regards,
Alexey
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
