开发者

how to set opacity in form regions or components/overlay image over component?

I am currently developing an application on c# Visual Studio 2010 that simulates the performance of several machines in a factory. One machine can be either paused or running. My interface is a tableLayoutPanel whose components are also table layout panels each one representing one machine.

I want there to be a distintction between machine that are running or paused, so I was thinking maybe that the tableLayoutPanel of all the machines that are paused could fade out to black a little bit so that it is clear to开发者_如何学C the user. There is another option that i was thinking about which is overlaying a big pause symbol over the region of the machine.

For the first idea I have read about the Opacity attribute of the Forms class but it only works for Form components, and it renders the window transparent instead of just dark, for the second I am not sure what to use or how to look.

Does anybody have an idea of what I could do? I am new to VisualStudio so excuse my ignorance!

thank you

José


To be honest in my opinion the standard way to indicate a control is dormant is to set it to be disabled.

For your second idea, if you really wanted to go that way, you could create an object which shows a Pause button on top of your layout panel, and hide/show it when you want to indicate it is paused I suppose, although it may look a little clumsy.

Simpler might be disabling all the controls associated with a machine when it's paused and just adding a row/string to your table layout with "This Machine Is Paused" in red or something?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜