日期:2014-05-17  浏览次数:21566 次

DevComponents.DotNetBar.ButtonItem宽度问题
    
 private DevComponents.DotNetBar.RibbonBar start;
        private DevComponents.DotNetBar.ButtonItem buttonItem14;

             // 
            // start
            // 

 this.start.AutoOverflowEnabled = false;
            this.start.Dock = System.Windows.Forms.DockStyle.Left;
            this.start.HorizontalItemAlignment = DevComponents.DotNetBar.eHorizontalItemsAlignment.Center;
            this.start.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
            this.buttonItem14});
            this.start.Location = new System.Drawing.Point(103, 0);
            this.start.Name = "start";
            this.start.ResizeItemsToFit = false;
            this.start.Size = new System.Drawing.Size(103, 59);
            this.start.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
            this.start.TabIndex = 1;
            this.start.Text = "启动";
            // 
            // buttonItem14
            // 
            this.buttonItem14.ImagePaddingHorizontal = 8;
            this.buttonItem14.Name = "buttonItem14";
            this.buttonItem14.SubItemsExpandWidth = 14;
            this.buttonItem14.Text = "开始";



说明:
在控件RibbonBar中添加了一个ButtonItem,但生成程序后,这个buttonItem宽度变的公容得下本身的text,跟编译器相比变小了,失真了, this.buttonItem14.Text = "    开始    ";这样的会略微变大一点,添再多空格也是这样。我看别人做的,这个buttonItem充满了整个RibbonBar,我用的DevComponents.DotNetBar2.dll却没有DOCK这个属性,不知是不是版本问题还是我设置错误?