I have some custom controls and I am trying to make them appear in the designer, both so that they appear when added to the form with code and so that they can be added to the form using the toolbox.
I have seen for example this but it seems ridiculously complicated considering that my custom controls are essentially sets of basic controls grouped together. Visual Studio can show a designer for each of my controls so it seems like I should be able to just force the designer to be recursive shouldn't I?
I read in another SO question (which I have lost the link to...) a much shorter version of that MSDN post which was essentially this part:
public override void Initialize(IComponent comp)
{
base.Initialize(comp);
var uc = (ctlAccountClassCode)comp;
EnableDesignMode(uc.txtCode, "txtCode");
}
I tried this set up in the same manner as the question showed, within a ctlAccoutClassCodeDesigner class and included the same files as the question did but it highlights Initialize and EnableDesignMode claiming that base does not have a definition for Initialize and that EnableDesigneMode does not exist in this context.
I have pretty much no idea what I'm doing here so any help is greatly appreciated, thanks guys.
Aucun commentaire:
Enregistrer un commentaire