سؤال

System.Windows.Forms.StatusStrip . واضاف لقد StatusStrip إلى نماذج Windows طلبي، ولكن أواجه بعض المشاكل.

وأود أن يكون تسمية الراسية في اليسار وprogressbar ترسو على الحق في StatusStrip، ولكن لا أستطيع أن أجد وسيلة لتعيين هذه الخصائص.

وبعد ذلك اعتقدت أنني قد تحتاج إلى إنشاء اثنين StatusStrips وترسيخها على جانبي الجزء السفلي من النموذج ... ولكن هذا لم توفق. بالإضافة إلى ذلك، فإنه فقط لا يشعر الحق.

هل كانت مفيدة؟

المحلول

ومجرد تعيين الخاصية Spring على تحكم تسمية لTrue ويجب أن تكون على ما يرام.

نصائح أخرى

ما عليك فعله هو تعيين الخاصية محاذاة progressbar إلى الحق في القيام به. ثم تعيين LayoutStyle من StatusStrip إلى HorizontalStackWithOverflow.

    private void InitializeComponent()
    {
        this.statusStrip1 = new System.Windows.Forms.StatusStrip();
        this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
        this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
        this.statusStrip1.SuspendLayout();
        this.SuspendLayout();
        // 
        // statusStrip1
        // 
        this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    this.toolStripStatusLabel1,
    this.toolStripProgressBar1});
        this.statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
        this.statusStrip1.Location = new System.Drawing.Point(0, 250);
        this.statusStrip1.Name = "statusStrip1";
        this.statusStrip1.Size = new System.Drawing.Size(467, 22);
        this.statusStrip1.TabIndex = 0;
        this.statusStrip1.Text = "statusStrip1";
        // 
        // toolStripStatusLabel1
        // 
        this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
        this.toolStripStatusLabel1.Size = new System.Drawing.Size(117, 17);
        this.toolStripStatusLabel1.Text = "toolStripStatusLabel1";
        // 
        // toolStripProgressBar1
        // 
        this.toolStripProgressBar1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
        this.toolStripProgressBar1.Name = "toolStripProgressBar1";
        this.toolStripProgressBar1.Size = new System.Drawing.Size(100, 16);

    }

    private System.Windows.Forms.StatusStrip statusStrip1;
    private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
    private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar1;

ويمكن تحقيق ذلك مع تخطيط الجدول الافتراضي للstatusStrip ببساطة عن طريق وضع تسمية أخرى بين التسمية الحالية وprogressBar وتعيين الخاصية الربيع إلى true.

هل حاولت في محاذاة ممتلكات ProgresBarToolStripItem لتعيين لأ href = <" http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripitemalignment(VS.85).aspx "يختلط = "نوفولو noreferrer"> حق ؟

وفتح مصمم وتعيين this.toolStripStatusLabel1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right؛

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top