layout files and inherited controls

DockableWindow/TabStripPanel for Windows Forms Forum

Posted 20 years ago by kh - United Kingdom
Avatar
hi. i have created a basic app with tool windows which have child controls which all inherit from a common base class. when i save the layout, the <child-name> element for all windows is the base class, not the derived class. because of this the layout file does not load.

the class heirarchy for each control is

UserControl
MyBaseWindow
MyBaseMultiWindow
MyWindow1
MyWindow2
etc...

in the layout file each child element is MyBaseMultiControl. how do i fix this?

thanks

kh

Comments (3)

Posted 20 years ago by kh - United Kingdom
Avatar
hmm. seems you are saving <child-control> data by control name, not control type, and each control was inheriting the name of the base control. if i explicitly set the name for each control when i create the tool windows the layout file saves/loads without error.

kh
Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Correct... you got it. In the major rewrite we're doing of docking controls this will no longer be an issue.


Actipro Software Support

Posted 20 years ago by kh - United Kingdom
Avatar
Thanks. Actually, storing this info by name has turned out to be useful because i have changed my design so that all tool windows now use the same control, each with a unique name, and this control is responsible for managing content (ie. child controls) within the window. i hope your next version allows for this design.

kh
The latest build of this product (v2.0.0208) was released 19 years ago, which was after the last post in this thread.