Questions tagged [toolstripitem]

49 questions
2
votes
1 answer

ToolStripTextBox1.ScrollBars = Windows.Forms.ScrollBars.Vertical

Quick question. Using VS2012, .net framework 4.5, VB on win7 x64. Trying to create a message holder in my status bar, to display long exception messages when something goes wrong in my app. I had an idea of using a ToolStripSplitButton and adding…
2
votes
2 answers

C# - Dynamically creating MenuStrip

I'm creating a web browser with tabs. To enter the URL, I'm trying to set a MenuStrip with its ToolStripMenuItem as a Textbox. I'm creating all the controls dynamically and I have 2 questions. 1). How can I insert a Textbox as the…
Isuru
  • 30,617
  • 60
  • 187
  • 303
1
vote
1 answer

How do I keep .NET 4.6.2 MenuStrip visible above application workspace (when programming in C#)

I have inherited some C# source code written in Visual Studio 2010 targeting the .NET 2.0 framework. It comprises a simple Windows Forms application with a single form as its user interface. The form contains a number of menu items, one of which…
DB17
  • 23
  • 6
1
vote
2 answers

Option Strict On disallows implicit conversions between String and Object {String}

I am trying to clean my ways as a beginner programmer by using Option Strict On. I managed to clean all errors except this one. I am using the Tag property of a ToolStrip for some text information. Clicking on the ToolStrip, I need to remember the…
Florin
  • 375
  • 3
  • 13
1
vote
1 answer

How to add Controls, as a toolbar, to a ContextMenuStrip?

I'm making a Web Browser, but I don't know how to add these buttons on top of its ContextMenuStrip: A Sepator make columns for all items, but no for only one line. Do you have any idea how to make that?
Kuba_Z2
  • 54
  • 1
  • 6
1
vote
1 answer

How to extract all ToolStripMenuItems of a ContextMenuStrip using recursion?

I am tryng to extract all items from a ContextMenuStrip to a List(Of ToolStripMenuItem). I can get the reference of the ContextMenuStrip of a DataGridView, then - with a recursive function - I want to extract the Name and Text properties of all the…
1
vote
1 answer

How to change the background color of ToolStripItems?

When I add a ToolStripMenuItem to a ContextMenuStrip and then add a ToolStripComboBox in it, the background color under the ToolStripComboBox isn't blue. However, as you can see it's blue under 'Sub opt2' (which is in the main options of…
1
vote
3 answers

how to get a list of a toolstrip control inner controls programmatically

I just noticed the hasChildren method doesn't return the various items in a toolstrip, just because its NOT a container I guess. There is an answer here in SO but it seems to me its far too complicated. Is there a simple way to iterate through the…
Didier Levy
  • 3,393
  • 9
  • 35
  • 57
1
vote
1 answer

How do I disable the toolstripitems on BindingNavigator?

I want to enable or disable the toolstripitems on the bindingnavigator programmatically. When I try to set the toolStripitem's enable property, it does not change. It does not give any exception but the value of Enable property does not change. What…
Ali Ersöz
  • 15,860
  • 11
  • 50
  • 64
1
vote
2 answers

ToolStripMenuItem location relative to parent

I am trying to extract the top left coordinate of the ToolStripMenuItem's location relative to that of its parent as it is rendered on screen. There is a Bounds property that has a Location member but it returns nonsensical (at least from my point…
Venom
  • 1,107
  • 4
  • 21
  • 46
1
vote
3 answers

Drawing a rectangle around a toolStripMenuItem

I know that I can draw rectangles just about anywhere I want using using (Graphics G = myControl.CreateGraphics()) { G.DrawRectangle(new Pen(myColor),myControl.Bounds); } but I'm having trouble figuring out how to do this with a…
user2320861
  • 1,391
  • 2
  • 11
  • 28
1
vote
0 answers

c# winforms sdi application updating multiple progressbars

Happy New Year all, I am developing a C# Winforms SDI application that relies heavily on background worker threads to carry out long-running database queries. My main dialog box contains a progress label and progress bar; but also a Toolstrip Menu,…
1
vote
1 answer

Detect right click on toolstrip button

I have a toolstrip with a context menu and a toolstrip button in it with a click event. Initially I tried to assign the context menu to the button itself, but couldn't find a context menu in its property. So I assigned the context menu to the…
Jerry
  • 4,258
  • 3
  • 31
  • 58
1
vote
1 answer

Do ToolStripMenuItem have any underlying unmanaged resource?

I use ToolStripMenuItem inside some of my projects and allocate it using C# operator new: ToolStripMenuItem someMenuItem = new ToolStripMenuItem("Some Item"); I read MSDN documentation on IDisposable interface and using statement…
VirtualVDX
  • 2,231
  • 1
  • 13
  • 14
1
vote
1 answer

Clickable ToolStripMenuItem Image

I'm working on a C# winForm app that has a ContextMenuStrip that adds toolStripMenuItems dynamically. I also have an icon in my resource file that I assign to the toolStripMenuItem.Image property and I handle the toolStripMenuItem.Click event. I…
Max Eisenhardt
  • 442
  • 2
  • 9
  • 20