Condividi tramite


ColorBuilder.BuildColor(IComponent, Control, String) Metodo

Definizione

Avvia un editor di colori per compilare un valore di proprietà di colore 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

Parametri

component
IComponent

Oggetto IComponent il cui sito deve essere utilizzato per accedere ai servizi in fase di progettazione.

owner
Control

Oggetto Control utilizzato come padre della finestra di selezione.

initialColor
String

Colore iniziale da visualizzare nella finestra di selezione, in un formato colore HTML valido.

Restituisce

String

Valore del colore, rappresentato in forma di stringa in un formato di colore HTML oppure null, se non è stato possibile recuperare il servizio del generatore.

Esempio

// 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")

Commenti

La stringa restituita, se diversa da null, indica un colore in un formato di colore HTML valido. I formati validi includono colori denominati e codici di colore in formato RGB (#RRGGBB).

Si applica a