不是!
在他的属性窗口里有一个buttons属性,在这里面你可以添加toolbar上的button.
在他的属性窗口里有一个buttons属性,在这里面你可以添加toolbar上的button.
解决方案 »
- 另开贴求combobox实际值和显示值
- 想做一个计算器
- C#软件项目开发
- 郁闷死了,c#里面从数据库返回XML序列,时间格式都是2006-05-17T00:00:00.0000000+08:00 这样的格式
- 用DataGrid新增到数据库后自动ID的问题?
- 拼音加加2004版是C#编写的,哪位朋友了解输入法编程?
- 有没有sql的语句分析分解的类库?
- 求教:.net 3.5多线程代码如何改成4.0 task任务来处理?
- 请来看看,我从exe文件中读取了一段字节,我知道它是IMAGE_NT_HEADERS结构,就用BinaryFormatter()反序列化,结果出错,
- WPF浏览器工程调试断点失效
- C# 注释问题讨论
- 信不信由你??
点new Separator就加一个间隔
我已经改了,还是没用
Button里的Size是灰的不让我改。
怎么办呢?
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;namespace MDINew
{
/// <summary>
/// Form3 的摘要说明。
/// </summary>
public class Form3 : System.Windows.Forms.Form
{
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null; public Form3()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent(); //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.SuspendLayout();
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton2,
this.toolBarButton3});
this.toolBar1.ButtonSize = new System.Drawing.Size(50, 50);
this.toolBar1.DropDownArrows = true;
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new System.Drawing.Size(480, 53);
this.toolBar1.TabIndex = 0;
//
// Form3
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(480, 310);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.toolBar1});
this.Name = "Form3";
this.Text = "Form3";
this.ResumeLayout(false); }
#endregion
}
}
这句话在我这里不起作用嘛?
为什么呢?
// toolBar1
//
this.toolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
this.toolBar1.AutoSize = false;
this.toolBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.保存记录1,
this.新建记录1});
this.toolBar1.ButtonSize = new System.Drawing.Size(10, 50);
this.toolBar1.DropDownArrows = true;
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new System.Drawing.Size(640, 32);
this.toolBar1.TabIndex = 1;
//
// statusBar1
//
this.statusBar1.Location = new System.Drawing.Point(0, 313);
this.statusBar1.Name = "statusBar1";
this.statusBar1.Size = new System.Drawing.Size(640, 16);
this.statusBar1.TabIndex = 2;
this.statusBar1.Text = "当前状态:";
//