473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Does not contain a defination for

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(typ eof(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.Ima ge;

this.toolStripButton1.Image =
((System.Drawing.Image)(resources.GetObject("toolS tripButton1.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
Jan 25 '07 #1
1 1611
Hello

I'll get it - It seams that every time i alter the control it automatically
removes the
defination for the AWToolbar:
private Aware.WControls.AWToolbar awToolbar1 = null;

Can anyone then tell me why it is removed? - thats strange.

Kind regards

"Johnny E. Jensen" <je*@winner-crm.dkwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
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(typ eof(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.Ima ge;

this.toolStripButton1.Image =
((System.Drawing.Image)(resources.GetObject("toolS tripButton1.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

Jan 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Akseli Mäki | last post by:
Hi, the subject say quite a lot. I have about the following code(4.01 transitional): <p>blaa blaa blaa <ul> <li><a href="foo.html">foo</a></li> <li><a href="bar.html">bar</a></li> </ul>
4
by: Guo Congbin | last post by:
·¢¼þÈË: "Guo Congbin" <guocongbin@sei.buaa.edu.cn> Ö÷Ìâ: is size_t a keyword?or a macro? ÈÕÆÚ: 2004Äê6ÔÂ17ÈÕ 23:04 if size_t is a macro, where is the defination? i look it up in the stddef.h,...
8
by: scl | last post by:
two class with same name exist in different dynamic linked library: a.so class REGION() { public: .... ~REGION() {} } b.so
25
by: venky | last post by:
Hi main() { int x; /* it declaration or defination??*/ }
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.