Langue

ColorBuilder.BuildColor(IComponent, Control, String) Méthode

Définition

Démarre un éditeur de couleurs pour générer une valeur de propriété de couleur HTML.

public:
 static System::String ^ BuildColor(System::ComponentModel::IComponent ^ component, System::Windows::Forms::Control ^ owner, System::String ^ initialColor);
public static string BuildColor(System.ComponentModel.IComponent component, System.Windows.Forms.Control owner, string initialColor);
static member BuildColor : System.ComponentModel.IComponent * System.Windows.Forms.Control * string -> string
Public Shared Function BuildColor (component As IComponent, owner As Control, initialColor As String) As String

Paramètres

component
IComponent

Dont le IComponent site doit être utilisé pour accéder aux services au moment du design.

owner
Control

Control Utilisé pour parenter la fenêtre du sélecteur.

initialColor
String

Couleur initiale à afficher dans la fenêtre du sélecteur, dans un format de couleur HTML valide.

Retours

Valeur de couleur, représentée sous forme de chaîne dans un format de couleur HTML, ou null si le service générateur n’a pas pu être récupéré.

Exemples

// Create a parent control.
System::Windows::Forms::Control^ c = gcnew System::Windows::Forms::Control;
c->CreateControl();

// Launch the Color Builder using the specified control
// parent and an initial HTML format (S"RRGGBB") color String*.
System::Web::UI::Design::ColorBuilder::BuildColor( this->Component, c, "405599" );
// Create a parent control.
System.Windows.Forms.Control c = new System.Windows.Forms.Control();            
c.CreateControl();            

// Launch the Color Builder using the specified control 
// parent and an initial HTML format ("RRGGBB") color string.
System.Web.UI.Design.ColorBuilder.BuildColor(this.Component, c, "405599");
' Create a parent control.
Dim c As New System.Windows.Forms.Control()
c.CreateControl()

' Launch the Color Builder using the specified control 
' parent and an initial HTML format ("RRGGBB") color string.
System.Web.UI.Design.ColorBuilder.BuildColor(Me.Component, c, "405599")

Remarques

La chaîne retournée, le cas échéant null, indique une couleur dans un format de couleur HTML valide. Les formats valides incluent les couleurs nommées et les codes de couleur au format RVB (#RRGGBB).

S’applique à