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 and ToolStripStatusLabel's one above the other dynamically, based on the number of accounts being processed at any given time. Is this possible? I was thinking of using a TableLayoutPanel inside the StatusStrip, but Visual Studio designer only allows very few components to be added to a StatusStrip. Is there any issue with me adding this programtically?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Probably it's not an intelligent UI design, but just for your information, you can add any control using
ToolStripControlHost
. Here is a simple example which lets you add multipleStatusBar
controls in a single item ofStatusStrip
using code:Note: You also can extend
ToolStripControlHost
to provide design-time support, to do so take a look at How to: Wrap a Windows Forms Control with ToolStripControlHost.