Sdílet prostřednictvím


ColorBuilder.BuildColor(IComponent, Control, String) Metoda

Definice

Spustí editor barev, který vytvoří hodnotu vlastnosti barvy 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

Jejíž IComponent web se má použít pro přístup ke službám v době návrhu.

owner
Control

Slouží Control k nadřazení okna výběru.

initialColor
String

Počáteční barva, která se má zobrazit v okně pro výběr, v platném formátu barev HTML.

Návraty

String

Hodnota barvy, reprezentovaná jako řetězec ve formátu barev HTML nebo null pokud se služba tvůrce nedala načíst.

Příklady

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

Poznámky

Vrácený řetězec, pokud jiný než null, označuje barvu v platném formátu barvy HTML. Platné formáty zahrnují pojmenované barvy a barevné kódy ve formátu RGB (#RRGGBB).

Platí pro