Snapshot for custom DevExpress grid - testcomplete

I have a custom DevExpress Grid overrided with custom GridView. How could I use table snapshots in TestComplete to support this control.
For custom TreeList I found the steps:
You can adjust TestComplete so that it handles a custom control in the same way as the corresponding “standard” control by using the Object Mapping feature. This feature sets a correspondence between control types and their possible class names. To specify that TestComplete should treat a specific control as one of the supported controls:
• Right-click your project in the Project Explorer panel and select Edit | Properties from the context menu. This will open the Project Properties Page.
• Select Object Mapping.
• In the list of control types, choose the type corresponding to your custom control.
• Press Add Class Name and enter the control’s class name.
-- or --
Click Add From Screen and capture the control using the subsequent Add New Object Class dialog.
The class names are case-insensitive and can contain wildcards (* and ?).
• Select File | Save from TestComplete’s main menu to save an object mapping template for the current project.
Note: TestComplete also provides scripting access to a number of child controls of supported third-party controls. Generally, you can work with a child control in the same way you work with its parent. For more information, see Working With Custom Child Controls.
You can not only add an object mapping template for a custom control in the current project, but for all new projects created with TestComplete. This is done in through the Object Mapping Options of the Default Project Properties dialog. In this case all new projects will already be “familiar” with the custom control.
and they work

Since you are working with a .NET Windows Forms applications that uses a grid based on the control from Developer Express, the base grid control is, most probably, XtraGrid. TestComplete has advanced support for this grid control (see the Working With Developer Express XtraGrid - Overview topic) and you can map your descendant grid to this supported control using the Object Mapping feature indeed.
To do this, you need to open the current project' properties editor (Tools | Current Project Properties), select the Object Mapping options group and find a record for the base XtraGrid control as the Developer Express Controls | XtraGrid item. Add the full name of your custom grid's class to the list. This name is stored in the ClrFullClassName property of the grid object. You can see this property in the Object Browser panel.

Related

MS Outlook 2010 Split Contacts Into Two Groups

I recently upgraded from Outlook 2007 to 2010. In Contacts, the Contacts are now split into two "groups" - they weren't in 2007.
I haven't been able to figure out why they're split, or find any suggestions via Googling, so any suggestions would be very welcome!
You need to customize the current view in Outlook. See the video tutorial.
Also you may implement the required task using VBA programmatically. The CurrentView property of the Folder or Explorer classes returns a View object representing the current view.
To obtain a View object for the view of the current Explorer, use Explorer.CurrentView instead of the CurrentView property of the current Folder object returned by Explorer.CurrentFolder.
Views are defined and customized using the View object's XML property. The XML property allows you to create and set a customized XML schema that defines the various features of a view.

Adding controls to a Property Sheet at runtime (without Dialog Templates)

As far as I can see, the way you normally create Property Sheets in Win32 (I am using the API, not MFC) programming is you have a bunch of dialog templates for each tab page, and you make the property sheet out of them. I have read about creating Dialog Templates 'in memory' but I would prefer not to do it this way. How do you add controls to a Property Sheet programatically at runtime, just like you can create a BUTTON and add it to a Window at runtime?
I suggest that you create a blank template and link that to your app. You can then create the property sheet with CreatePropertySheetPage and then add and remove controls to that property sheet as you please.
If you absolutely have to use a template built on the fly in memory, and you can't bring yourself to link a resource to your app, then you need the DLGTEMPLATE structure.

custom controls with sub components ownership

I have a Visual Studio designer enabled control which uses a collection editor to allow the user to create and edit sub components.
For example, I have a control which offers a readonly "List" property containing a collection of bindings (themselves components with a name property and an event). The user can modify this list of bindings at will and everything works pretty well. They can create and remove bindings without a glitch.
However, when they copy the control, the designer does not copy the binding, it still refers to the original binding components. Also, when they delete the control, it doesn't delete the bindings. It is as if the form has the ownership of these bindings, not the control.
I'm sure there is an attribute to use or some interface to implement, maybe even a custom editor trick to use, but googling for it has left me "feeling unlucky".
Thanks for any help you may have! :)

What ListBox like control is used in Collections Editor of Visual Studio

I need to create a from which uses the same ListBox as the one from Collection Editor of Visual Studio (The ListBox under the Members label). Please, explain exactly which WinForms control is this and which of its properties are set?
You can see the control I am asking about under the Members: label of every collection editor form in design time of Visual Studio.
Thank you.
Hopefully this can get you started. There's other (probably better...) samples out there, but this is a basic starter which can help you get the concept:
http://msdn.microsoft.com/en-us/library/9zky1t4k%28VS.90%29.aspx
Quote:
This example shows how to create a
control named ContactCollectionEditor
that implements a custom collection
editor. The example shows how to
specify the exact type of the object
that a page developer can add to the
control's collection property when
using a custom collection editor. You
associate a collection editor with a
collection property (or the type of
the property) by applying the
EditorAttribute to the collection
property of the control.

Viewing a list of Controls associated with a class in Visual Studio IDE

I'm using the form designer in VS.
I placed a label on my form, and then deleted it's text.
Currently, I can not locate the label.
How do I see a list of controls associated with a given class?
View --> Other Windows --> Document Outline
If you look in the properties window there should be a dropdown of all the controls on the form. You can select a control you can see and then you should see that control in the dropdown list. Then open the list and find the control you are looking for.
In your launched Visual Studio IDE open:
I - Solution Explorer with CTRL+ALT+L,
II - Document Outline with CTRL+ALT+T.
III - Open any class from the Solution Explorer to see the Document Outline populate accordingly.

Resources