Questions tagged [toolstripbutton]

67 questions
22
votes
3 answers

How to change System.Windows.Forms.ToolStripButton highlight/background color when checked?

I have a ToolStripButton that is used as a radio button. When it is checked, a blue outline surrounds the button, but there is no background color. It is not clear enough for the user that the button is checked, so I would like to change the…
mwalsher
  • 2,630
  • 2
  • 30
  • 41
10
votes
1 answer

How to get coordinates of ToolStripButton?

How can I get coordinates of ToolStripButton?
Yuriy
  • 2,561
  • 6
  • 27
  • 44
8
votes
3 answers

How to customize toolstrip button highlight color on mouse over

I use a ToolStrip in a C# winform application. As I move the mouse over a button it gets highlighted (transparent blue color), I would like to change this color I tried to use a custom renderer class toolStrip1.Renderer = new MyRenderer(); .... …
Ahmad
  • 6,124
  • 6
  • 49
  • 90
8
votes
2 answers

How to disable appearing of ToolTip text over ToolStripButton?

I trying to display own custom ToolTip with image, but the native ToolTip makes all bad. It still appears where it no needed. I creating ToolStripButton in that way: ToolStripButton btn = new ToolStripButton(); btn.Text = name; btn.ToolTipText =…
Kosmo零
  • 3,605
  • 5
  • 38
  • 74
8
votes
2 answers

How to make a ToolStrip button immediately clickable without clicking on the form first?

I have a windows forms app with a toolstrip that contains buttons. Frustratingly, I have to click twice on any button to get it to fire when the form isn't focused. The first click seems to activate the form, and then second click clicks the button…
ChaseMedallion
  • 19,262
  • 13
  • 76
  • 137
7
votes
1 answer

Is there a WPF equivalent for ToolStripButton?

I'm learning WPF and have been trying to create a toolstrip. Is there a direct equivalent of the WinForms ToolStripButton or is the correct way of use just to add a normal button and format it? I've found that Microsoft have a page that lists…
GrandMasterFlush
  • 5,857
  • 17
  • 73
  • 98
4
votes
2 answers

ToolStripButton: what's wrong with assigning an image programmatically

There is a Form with a ToolStrip. This ToolStrip contains a ToolStripButton. I want to assign an image to this button: this.btnSaveFile.Image = Bitmap.FromFile("C:\\Work\\Icons\\png\\save.png"); It works only if there is save.png on specified path.…
Racoon
  • 871
  • 2
  • 13
  • 30
3
votes
4 answers

How do I change the cursor for a ToolStripButton?

I want to change the user's cursor when they hover over a specific ToolStripButton, but not for the other items on the ToolStrip. How do I set the button's cursor?
Simon
  • 24,010
  • 36
  • 139
  • 249
3
votes
3 answers

Why is a NullReferenceException thrown when a ToolStrip button is clicked twice - openFileDialog.showDialog()?

I created a clean WindowsFormsApplication solution, added a ToolStrip to the main form, and placed one button on it. I've added also an OpenFileDialog, so that the Click event of the ToolStripButton looks like the following: private void…
3
votes
2 answers

toolstripbutton remove lighting

I have a toolstripbutton into my toolstrip, and I wish remove the orange lighting when a mouse is hover, because I change the picture of the button dynamically.. How can I do this?
ghiboz
  • 7,297
  • 20
  • 76
  • 122
3
votes
6 answers

ToolStripButton text gets cut off in ContextMenuStrip

I am instantiating my own ToolStripButton and adding it to a ContextMenuStrip. It pops up but the text gets cut off: string[] layouts = new string[]{"Test 1", "Test 2", "Test 3"}; List items = new List(); foreach…
leora
  • 163,579
  • 332
  • 834
  • 1,328
3
votes
2 answers

How to programmatically press toolstripbutton down?

I want to push toolstripbutton down in my code and I can't seem to be able to do that. I know on Delphi RAD Studio or XE, you can do the following and cause the button to be pressed. ToolStripButton1.Down := true; The only ToolStripButton property…
ThN
  • 3,041
  • 2
  • 47
  • 108
2
votes
2 answers

How do I programmatically wire up ToolStripButton events in C#?

I'm programmatically adding ToolStripButton items to a context menu. That part is easy. this.tsmiDelete.DropDownItems.Add("The text on the item."); However, I also need to wire up the events so that when the user clicks the item something actually…
James
  • 2,014
  • 2
  • 25
  • 33
2
votes
3 answers

C# inform how would one change an image on the toolstrip after it is selected

I am looking to change the image of the button on the tool strip after it is selected. The image property is system.drawing.bitmap and was saved to Properties\Resources.resx file. Thanks in advancen An explanation of the logic would be nice too!
Yaron Buki
  • 71
  • 2
  • 11
2
votes
2 answers

Distorted images when using ImageList on ToolStripButton

I want to put some images into a ToolStripButton, and have the images change depending on the state of the button. So I've set the .ImageList of the ToolStrip to be my ImageList and simply change the ToolStripButton.ImageIndex to the appropriate…
JohnUbuntu
  • 567
  • 4
  • 17
1
2 3 4 5