NewsBot
1
Hi!,
I've created a new component, in constructor i set default properties
(Nothing in special)
******* public LookUpCentroContable() : base()
******* {***********
***********
*********** Properties.Columns.Add(new LookUpColumnInfo("IdCentro", 70, "Id."));
*********** Properties.Columns["IdCentro"].FormatType = Numeric;
*********** Properties.Columns.Add(new LookUpColumnInfo("Nombre", 250, "Nombre"));
*********** Properties.Columns.Add(new LookUpColumnInfo("CentroAbrev", 90, "Abreviatura"));
*********** Properties.PopupWidth = 410;
*********** Properties.NullText = "";
******* }
But when i drop this control on a form myForm.Designer.cs creates these lines automatically :-(
*********** //
*********** // lookUpCentroContable
*********** //
*********** this.lookUpCentroContable.Location = new System.Drawing.Point(128, 0);
*********** this.lookUpCentroContable.Name = "lookUpCentroContable";
*********** this.lookUpCentroContable.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
*********** new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
*********** this.lookUpCentroContable.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] {
*********** new DevExpress.XtraEditors.Controls.LookUpColumnInfo("IdCentro", "Id.", 70, DevExpress.Utils.FormatType.Numeric, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None),
*********** new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 250),
*********** new DevExpress.XtraEditors.Controls.LookUpColumnInfo("CentroAbrev", "Abreviatura", 90)});
*********** this.lookUpCentroContable.Properties.NullText = "";
*********** this.lookUpCentroContable.Properties.PopupWidth = 410;
*********** this.lookUpCentroContable.Size = new System.Drawing.Size(100, 20);
*********** this.lookUpCentroContable.TabIndex = 39;
And the result is these columns are setting twice, so it appears twice in execution :-(
How can I avoid these designer automatic initializations.
I supose i should move code from constructor to an override method based on Control, any idea?
Thanks in advance
More...
View All Our Microsoft Related Feeds
I've created a new component, in constructor i set default properties
(Nothing in special)
******* public LookUpCentroContable() : base()
******* {***********
***********
*********** Properties.Columns.Add(new LookUpColumnInfo("IdCentro", 70, "Id."));
*********** Properties.Columns["IdCentro"].FormatType = Numeric;
*********** Properties.Columns.Add(new LookUpColumnInfo("Nombre", 250, "Nombre"));
*********** Properties.Columns.Add(new LookUpColumnInfo("CentroAbrev", 90, "Abreviatura"));
*********** Properties.PopupWidth = 410;
*********** Properties.NullText = "";
******* }
But when i drop this control on a form myForm.Designer.cs creates these lines automatically :-(
*********** //
*********** // lookUpCentroContable
*********** //
*********** this.lookUpCentroContable.Location = new System.Drawing.Point(128, 0);
*********** this.lookUpCentroContable.Name = "lookUpCentroContable";
*********** this.lookUpCentroContable.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
*********** new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
*********** this.lookUpCentroContable.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] {
*********** new DevExpress.XtraEditors.Controls.LookUpColumnInfo("IdCentro", "Id.", 70, DevExpress.Utils.FormatType.Numeric, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None),
*********** new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Nombre", "Nombre", 250),
*********** new DevExpress.XtraEditors.Controls.LookUpColumnInfo("CentroAbrev", "Abreviatura", 90)});
*********** this.lookUpCentroContable.Properties.NullText = "";
*********** this.lookUpCentroContable.Properties.PopupWidth = 410;
*********** this.lookUpCentroContable.Size = new System.Drawing.Size(100, 20);
*********** this.lookUpCentroContable.TabIndex = 39;
And the result is these columns are setting twice, so it appears twice in execution :-(
How can I avoid these designer automatic initializations.
I supose i should move code from constructor to an override method based on Control, any idea?
Thanks in advance
More...
View All Our Microsoft Related Feeds