How can I make the IDE create correct code?
I implement a component, but I can't get it's paraent (a control which contain the component).
So I want to get the paraent from constructor's parameter.
But the IDE can't create corrent code for my new constructor.
How can I make the IDE create correct code?
I want to let the IDE automatic create the correct code, because I want to get the paraent inDesign Time mode.example:
The illegal code:
| |
#region Component Designer generated code/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.button1 = new System.Windows.Forms.Button(); this.localizeEngine1 = new GrapeCity.Win.Input.Design.LocalizeEngine(this.components); ((System.ComponentModel.ISupportInitialize)(this.localizeEngine1)).BeginInit(); this.SuspendLayout(); // // button1 // ...
|
|
The correct code:
| |
#region Component Designer generated code/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.button1 = new System.Windows.Forms.Button(); this.localizeEngine1 = new GrapeCity.Win.Input.Design.LocalizeEngine(this.components,this); ((System.ComponentModel.ISupportInitialize)(this.localizeEngine1)).BeginInit(); this.SuspendLayout(); // // button1 // ...
|
|
Thank you!
I think you probably have more luck if you post this question in the "Windows Forms Designer" forum.
Best regards,
Johan Stenberg