C#中的音频编辑器提示 [英] Audio editor tips in c#
本文介绍了C#中的音频编辑器提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Windows窗体如何调用自身?
基本上我不是在寻找工具条菜单栏,例如,如果我单击菜单栏上的主页",我希望它在窗口上显示某些功能,如果我从菜单中单击文件"条,我希望它在同一窗口中显示其他不同的选项.
希望您能理解我要解释的内容.
How can a windows form call itself ?
Basically I''m not looking for a tool strip menu bar, what I want is for example if I click "home" from the menu bar I want it to display some functions on the window, if I click "file" from the menu bar I want it to display other different options in the same window.
Thanks hope you understand what I tried to explain.
推荐答案
您正在描述TabControl
.因此,您可以使用一个,或者,如果您不喜欢它的外观,则可以使用z轴堆叠面板来伪造它.然后,如果需要面板,则可以简单地调用Panel.BringToFront()
方法.
如果您需要进一步的解释,请随时提出.祝你好运!
You are describing aTabControl
. So, you may either use one or, if you don''t like its appearance, you may fake it using z-axis stacked panels. Then, if a panel is needed, you can simply call thePanel.BringToFront()
method.
If you need further explanation, feel free to ask. Good luck!
好吧...
1.将MainMenu
放在Form
上.
2.创建MenuItem
s.
3.创建第一个Panel
.
4.将其Dock
属性设置为DockStyle.Fill
.
5.将任何想要的Control
放在上面.
6.对所有其他Panel
重复步骤3至5.
注意:有一个问题.由于Panel
都在同一个Form
上并且都具有Dock = DockStyle.Fill
,因此在设计器中只有最上面的一个可见.但这正是您想要的,对吧?好的,但是您想在不可见的元素上添加一些Control
.因此,右键单击可见的鼠标,然后单击发送到后退.下面的Panel
现在将可见.依此类推.
7.为MenuItem
创建Click event
处理程序,例如:
Well...
1. Place theMainMenu
on yourForm
.
2. Create theMenuItem
s.
3. Create the firstPanel
.
4. Set itsDock
property toDockStyle.Fill
.
5. Place whateverControl
s you want on it.
6. Repeat steps 3 to 5 for all the otherPanel
s.
Note: There is an issue. Since thePanel
s are all on the sameForm
and all haveDock = DockStyle.Fill
, only the uppermost one will be visible in the designer. But that''s exactly what you want it to be, right? Ok, but you want to add someControl
s on the invisible ones. So, right-click on the visible one and click Send To Back. ThePanel
below will now be visible. And so on.
7. CreateClick event
handlers for yourMenuItem
s, for example:
private void menuHome_Click(object sender, EventArgs e)
{
this.panelHome.BringToFront();
}
就是这样!
That''s all!
这篇关于C#中的音频编辑器提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文