مشاركة عبر


Button.Right الخاصية

يحصل على المسافة، في نقاط، بين الحافة اليمنى من Buttonوالحافة اليسرى لورقة عمل.

مساحة الاسم:  Microsoft.Office.Tools.Excel.Controls
التجميع:  Microsoft.Office.Tools.Excel.v4.0.Utilities (في Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

بناء الجملة

'إقرار
Public ReadOnly Property Right As Double
    Get
public double Right { get; }

قيمة الخاصية

النوع: System.Double
المسافة، في نقاط، بين الحافة اليمنى من Buttonوالحافة اليسرى لورقة عمل.

ملاحظات

القيمة Rightخاصية تساوي جمع Leftقيمة الخاصية و Widthقيمة الخاصية.

Button.Rightتستخدم خاصية نقاط، بينما Control.Rightتستخدم خاصية بكسل.

تعيين القيمة إلى رقم سالب أو عدد أكبر من 12288 لا يقوم بطرح استثناء ولكن ينتج عنه عنصر تحكم يتم تعيين بين 0 و 12288.

أمثلة

مثال التعليمة البرمجية التالية يضيف Buttonعنصر تحكم في خلية B2. Clickمعالج حدث من زر عرض قيم الحالي Rightو Bottomخصائص زر. عند العمود B أو الصف 2 هو مغٍِير حجمهاها في وقت التشغيل، تغيير هذه قيم وفقا لحجم العمود أو الصف الجديد.

Th هو المثال هو لتخصيص المستوى مستند.

Private Sub DisplayRightAndBottom()
    Dim PointButton As Microsoft.Office.Tools.Excel.Controls.Button = _
        Me.Controls.AddButton(Me.Range("B2", "C3"), "PointButton")
    PointButton.Text = "Click to display location"
    AddHandler PointButton.Click, AddressOf PointButton_Click
End Sub

Private Sub PointButton_Click(ByVal sender As Object, ByVal e As EventArgs)
    Dim ClickedButton As Microsoft.Office.Tools.Excel.Controls.Button = _
        CType(sender, Microsoft.Office.Tools.Excel.Controls.Button)

    MsgBox("Right is: " & ClickedButton.Right.ToString() & _
        "; Bottom is: " & ClickedButton.Bottom.ToString())
End Sub
private void DisplayRightAndBottom()
{
    Microsoft.Office.Tools.Excel.Controls.Button pointButton =
        this.Controls.AddButton(this.Range["B2", "C3"],
        "pointButton");
    pointButton.Text = "Click to display location";
    pointButton.Click += new EventHandler(pointButton_Click);
}

void pointButton_Click(object sender, EventArgs e)
{
    Microsoft.Office.Tools.Excel.Controls.Button clickedButton =
        (Microsoft.Office.Tools.Excel.Controls.Button)sender;

    MessageBox.Show("Right is: " + clickedButton.Right.ToString() +
        "; Bottom is: " + clickedButton.Bottom.ToString());
}

أمن NET Framework.

راجع أيضًَا

المرجع

Button الفئة

Button الأعضاء

Microsoft.Office.Tools.Excel.Controls مساحة الاسم