statusstrip

How can I display the line position in a TextBox on the status bar?

送分小仙女□ 提交于 2019-12-24 16:43:09
问题 I have added a StatusStrip control and placed a StatusLabel inside of it. But now I want to know how to connect it to my TextBox to show the line number and position of the cursor, like: "Line 2, Row 6". Thank you 回答1: Get the index of the caret in the TextBox: C# int caretIndex = textBox.SelectionStart; VB.NET Dim caretIndex As Integer = textBox.SelectionStart Get the line number from the caret index: C# int lineNumber = textBox.GetLineFromCharIndex(caretIndex); VB.NET Dim lineNumber As

change the height of statusStrip

こ雲淡風輕ζ 提交于 2019-12-12 11:00:31
问题 I have a simple windows form with a statusStrip in VS2010, and no matter what I tried, the height of statusStrip does not change, what is proper way of changing the height?? thanks 回答1: I just changed the StatusStrip size without problems... Create a new Form. Create a StatusStrip. Set its property "Dock" to "None". Set its property "Autosize" to "False". Set its property "Size" with Height = 'the height you need' (I have put it to 100). If you want, now you can Dock to "Bottom" again. Add a

C# - How to make a StatusStrip resize a borderless Form

▼魔方 西西 提交于 2019-12-11 10:36:53
问题 I am trying to resize a borderless form with a StatusStrip (I'm using a tool strip for many reasons). I have successfully moved a form with a MenuStrip, but never resized, so I do have a little understanding on sending messages and EventHandling. However, the StatusStrip doesn't move when clicked. Below is what I have so far. Custom StatusStrip Class: public class PassThroughStatusStrip : StatusStrip{ protected override void WndProc(ref Message m){ const int WM_NCHITTEST = 0x0084; const int

Show Text on ProgressBar in StatusStrip

不羁岁月 提交于 2019-12-11 03:39:12
问题 I am new in windows programming . In C# I was working with using Visual Studio 2017. Now, Im stuck with a problem. The Problem is that, I am trying to display some text (the progress value) in ProgressBar in the StatusStrip but can't find a proper working way to do that. :-( Can anyone please provide me some ideas or solution to this problem? I shall be glad and thankful to you ! Your answers will be appreciated greatly. :-) 回答1: ToolStripProgressBar component uses a ProgressBar to show the

How do I remove the resize gripper image from a StatusStrip control in C#?

有些话、适合烂在心里 提交于 2019-12-06 18:12:33
问题 I need to show a StatusStrip control docked top instead of bottom. User requirement. Long story. How do I get the StatusStrip to display without the dots in the right corner? 回答1: Set the SizingGrip attribute to false: StatusStrip.SizingGrip = false; 来源: https://stackoverflow.com/questions/2464590/how-do-i-remove-the-resize-gripper-image-from-a-statusstrip-control-in-c

Multiple Progress Bars in StatusStrip

守給你的承諾、 提交于 2019-12-02 13:14:51
问题 I have an application where there can be several lengthy (minutes) tasks happening simultaneously in the background (i.e. the same task for different accounts, some accounts taking longer than others). I would like to show a progress bar and status text for each task in parallel. I supposed I could show that in a different window if there were many such accounts, but for now the scenario is just to have 2-4 accounts, therefore I'd like to show the progress bars in a StatusStrip at the bottom

Multiple Progress Bars in StatusStrip

偶尔善良 提交于 2019-12-02 04:28:00
I have an application where there can be several lengthy (minutes) tasks happening simultaneously in the background (i.e. the same task for different accounts, some accounts taking longer than others). I would like to show a progress bar and status text for each task in parallel. I supposed I could show that in a different window if there were many such accounts, but for now the scenario is just to have 2-4 accounts, therefore I'd like to show the progress bars in a StatusStrip at the bottom of the main form. I am thinking the StatusStrip should grow up and I would add ToolStripProgressBar's

How do I right align controls in a StatusStrip?

ε祈祈猫儿з 提交于 2019-11-29 21:59:29
I am trying to right align a control in a StatusStrip . How can I do that? I don't see a property to set on ToolStripItem controls that specifies their physical alignment on the parent StatusStrip . How do I get Messages drop down to be right aligned? http://i.friendfeed.com/ed90b205f64099687db30553daa79d075f280b90 Eric Schoonover Found it via MSDN forums almost immediately after posting :) You can use a ToolStripLabel to pseudo right align controls by setting the Text property to string.Empty and setting the Spring property to true . This will cause it to fill all of the available space and

How do I feed values to the statusStrip from a form control?

让人想犯罪 __ 提交于 2019-11-29 16:26:02
This is the context of my controls: /* Form StatusStrip ToolStripStatusLabel TableLayoutPanel MyGenioView */ So, MyGenioView is intercepting the MouseMove event handler. The code that is already there is for a rubber band rectangle. So I have: public void MyMouseMove(Object sender, MouseEventArgs e) { Point ptCurrent = new Point(e.X, e.Y); // If we "have the mouse", then we draw our lines. if (m_bHaveMouse) { // If we have drawn previously, draw again in // that spot to remove the lines. if (m_ptLast.X != -1) { MyDrawReversibleRectangle(m_ptOriginal, m_ptLast); } // Update last point. m_ptLast

ToolStripStatusLabel displayed as black box

人盡茶涼 提交于 2019-11-29 15:24:16
I use StatusStrip that contains ToolStripStatusLabel. OS - Windows 7, framework 2.0. Usually all displayed normal, but sometimes ToolStripStatusLabel looks like black box: I read that windows bug, but how I can fix it? This is an obscure bug, triggered when you display the form with the Windows toolbar overlapping your StatusStrip. Moving the window away from the toolbar doesn't get the ToolStripItems on the status strip repainted properly. You'll find a bit of background in this forum post . There was a weak promise for a future fix for it, no idea if that ever happened. Probably not if you