مشاركة عبر


WorkbookBase.Colors الخاصية

الحصول على أو قم بتعيين الألوان في لوح الألوان مصنف.

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

بناء الجملة

'إقرار
Public ReadOnly Property Colors As Workbook_ColorsType
    Get
public Workbook_ColorsType Colors { get; }

قيمة الخاصية

النوع: Microsoft.Office.Tools.Excel.Workbook_ColorsType
القيمة اللون RGB في لوح الألوان مصنف، أو صفيفة يحتوي على قيم ألوان RGB 56 الجميع في لوح الألوان مصنف.

ملاحظات

Colorsالخصائص التي يمكن استخدامها مع معلمة التالية.

المعلمة

الوصف

Index

رقم الفهرس للون باللون مصنف لوح الألوان (من 1 إلى 56). إذا كان ترتيب هو الوسيطة هو غير محدد، th هو خاصية بإرجاع صفيفة يحتوي على 56 الجميع الألوان في لوح الألوان.

إذا قمت بمحاولة إلى استخدام Colorsدون تحديد أية معلمات Colorsستحصل Workbook_ColorsTypeالكائن الذي هو جزء المكتب التطوير إلى ols في البنية التحتية لبرنامج ‏‫Visual Studio وليس الهدف من إلى يمكن استخدامها مباشرة من تعليمات برمجية الخاصة بك.

لوح ألوان مصنف يحتوي على إدخالات 56، تمثيل كل بواسطة قيمة RGB.

المعلمات الإختيارية

ل معلومات تشغيل معلمات اختيارية، راجع يفتقد المتغير و "المعلمات الاختيارية" في حلول Office.

أمثلة

يستخدم المثال التالي رمز Colorsخاصية تعيين اﻷول اللون في لوح الألوان للمصنف إلى أزرق، ثم يعرض Excel Microsoft المكتب برمجياً الحوار لوحة الألوان من للتحقق من أنه تم إجراء هذا تغيير.

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

Private Sub SetFirstColorInPalette()
    Me.Colors(1) = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Blue)
    Me.Application.Dialogs( _
        Excel.XlBuiltInDialog.xlDialogColorPalette).Show()
End Sub
private void SetFirstColorInPalette()
{
    this.Colors[1] = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Blue);

    this.Application.Dialogs[
        Excel.XlBuiltInDialog.xlDialogColorPalette].Show(
        missing, missing, missing, missing, missing, missing,
        missing, missing, missing, missing, missing, missing,
        missing, missing, missing, missing, missing, missing,
        missing, missing, missing, missing, missing, missing,
        missing, missing, missing, missing, missing, missing);
}

أمن NET Framework.

راجع أيضًَا

المرجع

WorkbookBase الفئة

WorkbookBase الأعضاء

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