J
Johnny E. Jensen
Hello
I have a class that inherence from the ToolStrip control called (AWToolbar),
and i added my own methods to that class.
Then i have a usercontroll (QuickNavigator), and I add the AWToolbar, by
dragging it onto the usercontrol. It works OK
At this state my InitializeComponent() looks like:
this.awToolbar1 = new Aware.WControls.AWToolbar();
this.SuspendLayout();
//
// awToolbar1
//
this.awToolbar1.Location = new System.Drawing.Point(0, 0);
this.awToolbar1.Name = "awToolbar1";
this.awToolbar1.Size = new System.Drawing.Size(148, 25);
this.awToolbar1.TabIndex = 0;
this.awToolbar1.Text = "awToolbar1";
//
// QuickNavigator
//
this.Controls.Add(this.awToolbar1);
this.Name = "QuickNavigator";
this.Load += new System.EventHandler(this.QuickNavigator_Load);
this.ResumeLayout(false);
this.PerformLayout();
As soon as i add an item to the AWToolbar I'll get this error:
'QuickNavigator' does not contain a defination for awToolbar1 and now the
initializeComponent looks like:
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(QuickNavigator));
this.awToolbar1 = new Aware.WControls.AWToolbar();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.awToolbar1.SuspendLayout();
this.SuspendLayout();
//
// awToolbar1
//
this.awToolbar1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1});
this.awToolbar1.Location = new System.Drawing.Point(0, 0);
this.awToolbar1.Name = "awToolbar1";
this.awToolbar1.Size = new System.Drawing.Size(148, 25);
this.awToolbar1.TabIndex = 0;
this.awToolbar1.Text = "awToolbar1";
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image =
((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
//
// QuickNavigator
//
this.Controls.Add(this.awToolbar1);
this.Name = "QuickNavigator";
this.Load += new System.EventHandler(this.QuickNavigator_Load);
this.awToolbar1.ResumeLayout(false);
this.awToolbar1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
And outside the InitializeComponent() this is added:
private System.Windows.Forms.ToolStripButton toolStripButton1;
Can anyone provide some help please.
Kind regards
Johnny Jensen
I have a class that inherence from the ToolStrip control called (AWToolbar),
and i added my own methods to that class.
Then i have a usercontroll (QuickNavigator), and I add the AWToolbar, by
dragging it onto the usercontrol. It works OK
At this state my InitializeComponent() looks like:
this.awToolbar1 = new Aware.WControls.AWToolbar();
this.SuspendLayout();
//
// awToolbar1
//
this.awToolbar1.Location = new System.Drawing.Point(0, 0);
this.awToolbar1.Name = "awToolbar1";
this.awToolbar1.Size = new System.Drawing.Size(148, 25);
this.awToolbar1.TabIndex = 0;
this.awToolbar1.Text = "awToolbar1";
//
// QuickNavigator
//
this.Controls.Add(this.awToolbar1);
this.Name = "QuickNavigator";
this.Load += new System.EventHandler(this.QuickNavigator_Load);
this.ResumeLayout(false);
this.PerformLayout();
As soon as i add an item to the AWToolbar I'll get this error:
'QuickNavigator' does not contain a defination for awToolbar1 and now the
initializeComponent looks like:
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(QuickNavigator));
this.awToolbar1 = new Aware.WControls.AWToolbar();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.awToolbar1.SuspendLayout();
this.SuspendLayout();
//
// awToolbar1
//
this.awToolbar1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1});
this.awToolbar1.Location = new System.Drawing.Point(0, 0);
this.awToolbar1.Name = "awToolbar1";
this.awToolbar1.Size = new System.Drawing.Size(148, 25);
this.awToolbar1.TabIndex = 0;
this.awToolbar1.Text = "awToolbar1";
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image =
((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
//
// QuickNavigator
//
this.Controls.Add(this.awToolbar1);
this.Name = "QuickNavigator";
this.Load += new System.EventHandler(this.QuickNavigator_Load);
this.awToolbar1.ResumeLayout(false);
this.awToolbar1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
And outside the InitializeComponent() this is added:
private System.Windows.Forms.ToolStripButton toolStripButton1;
Can anyone provide some help please.
Kind regards
Johnny Jensen