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 InitializeCompo nent() looks like:
this.awToolbar1 = new Aware.WControls .AWToolbar();
this.SuspendLay out();
//
// 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.A dd(this.awToolb ar1);
this.Name = "QuickNavigator ";
this.Load += new System.EventHan dler(this.Quick Navigator_Load) ;
this.ResumeLayo ut(false);
this.PerformLay out();
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
initializeCompo nent looks like:
private void InitializeCompo nent()
{
System.Componen tModel.Componen tResourceManage r resources = new
System.Componen tModel.Componen tResourceManage r(typeof(QuickN avigator));
this.awToolbar1 = new Aware.WControls .AWToolbar();
this.toolStripB utton1 = new System.Windows. Forms.ToolStrip Button();
this.awToolbar1 .SuspendLayout( );
this.SuspendLay out();
//
// awToolbar1
//
this.awToolbar1 .Items.AddRange (new System.Windows. Forms.ToolStrip Item[] {
this.toolStripB utton1});
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 ";
//
// toolStripButton 1
//
this.toolStripB utton1.DisplayS tyle =
System.Windows. Forms.ToolStrip ItemDisplayStyl e.Image;
this.toolStripB utton1.Image =
((System.Drawin g.Image)(resour ces.GetObject(" toolStripButton 1.Image")));
this.toolStripB utton1.ImageTra nsparentColor = System.Drawing. Color.Magenta;
this.toolStripB utton1.Name = "toolStripButto n1";
this.toolStripB utton1.Size = new System.Drawing. Size(23, 22);
this.toolStripB utton1.Text = "toolStripButto n1";
//
// QuickNavigator
//
this.Controls.A dd(this.awToolb ar1);
this.Name = "QuickNavigator ";
this.Load += new System.EventHan dler(this.Quick Navigator_Load) ;
this.awToolbar1 .ResumeLayout(f alse);
this.awToolbar1 .PerformLayout( );
this.ResumeLayo ut(false);
this.PerformLay out();
}
And outside the InitializeCompo nent() this is added:
private System.Windows. Forms.ToolStrip Button toolStripButton 1;
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 InitializeCompo nent() looks like:
this.awToolbar1 = new Aware.WControls .AWToolbar();
this.SuspendLay out();
//
// 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.A dd(this.awToolb ar1);
this.Name = "QuickNavigator ";
this.Load += new System.EventHan dler(this.Quick Navigator_Load) ;
this.ResumeLayo ut(false);
this.PerformLay out();
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
initializeCompo nent looks like:
private void InitializeCompo nent()
{
System.Componen tModel.Componen tResourceManage r resources = new
System.Componen tModel.Componen tResourceManage r(typeof(QuickN avigator));
this.awToolbar1 = new Aware.WControls .AWToolbar();
this.toolStripB utton1 = new System.Windows. Forms.ToolStrip Button();
this.awToolbar1 .SuspendLayout( );
this.SuspendLay out();
//
// awToolbar1
//
this.awToolbar1 .Items.AddRange (new System.Windows. Forms.ToolStrip Item[] {
this.toolStripB utton1});
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 ";
//
// toolStripButton 1
//
this.toolStripB utton1.DisplayS tyle =
System.Windows. Forms.ToolStrip ItemDisplayStyl e.Image;
this.toolStripB utton1.Image =
((System.Drawin g.Image)(resour ces.GetObject(" toolStripButton 1.Image")));
this.toolStripB utton1.ImageTra nsparentColor = System.Drawing. Color.Magenta;
this.toolStripB utton1.Name = "toolStripButto n1";
this.toolStripB utton1.Size = new System.Drawing. Size(23, 22);
this.toolStripB utton1.Text = "toolStripButto n1";
//
// QuickNavigator
//
this.Controls.A dd(this.awToolb ar1);
this.Name = "QuickNavigator ";
this.Load += new System.EventHan dler(this.Quick Navigator_Load) ;
this.awToolbar1 .ResumeLayout(f alse);
this.awToolbar1 .PerformLayout( );
this.ResumeLayo ut(false);
this.PerformLay out();
}
And outside the InitializeCompo nent() this is added:
private System.Windows. Forms.ToolStrip Button toolStripButton 1;
Can anyone provide some help please.
Kind regards
Johnny Jensen
Comment