Partage via


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

Définition

Démarre un éditeur de couleurs qui permet de 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

IComponent dont le site donne accès aux services de design.

owner
Control

Control utilisé pour apparenter 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

String

Valeur de couleur, représentée sous forme d'une chaîne de format couleur HTML, ou null si le service de génération 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, si autre que nullcelle-ci 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 à