You need to set the ToolStripItem.DisplayStyle Image property , and then set the image property
Here is a sample from MSDN which
- gets image from file
- sets the style for image and text
- aligns image to MiddleLeft
- name itme
- sets text alignment to MiddleRight
- sets the text
- and adds a Click event handler
Example
this.toolStripButton1.Image = Bitmap.FromFile("c:\\NewItem.bmp");
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText;
this.toolStripButton1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Text = "&New";
this.toolStripButton1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
source
share