Udostępnij przez


ColorBuilder.BuildColor(IComponent, Control, String) Metoda

Definicja

Uruchamia edytor kolorów, aby utworzyć wartość właściwości koloru 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

Parametry

component
IComponent

Obiekt IComponent , którego witryna ma być używana do uzyskiwania dostępu do usług w czasie projektowania.

owner
Control

Element Control używany do nadrzędnego okna selektora.

initialColor
String

Początkowy kolor, który ma być wyświetlany w oknie selektora, w prawidłowym formacie koloru HTML.

Zwraca

Wartość koloru reprezentowana jako ciąg w formacie koloru HTML lub null jeśli nie można pobrać usługi konstruktora.

Przykłady

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

Uwagi

Zwrócony ciąg, jeśli inny niż null, wskazuje kolor w prawidłowym formacie koloru HTML. Prawidłowe formaty obejmują nazwane kolory i kody kolorów w formacie RGB (#RRGGBB).

Dotyczy