Share via


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

Definición

Inicia un editor de colores para crear un valor de propiedad de color 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

Parámetros

component
IComponent

IComponent cuyo sitio se utilizará para obtener acceso a servicios en tiempo de diseño.

owner
Control

Control que se utiliza para asociar la ventana del selector.

initialColor
String

Color inicial que se mostrará en la ventana del selector en un formato de color HTML válido.

Devoluciones

Valor de color, representado como cadena en un formato de color HTML, o null si el servicio del generador no se puede recuperar.

Ejemplos

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

Comentarios

La cadena devuelta, si no nulles , indica un color en un formato de color HTML válido. Los formatos válidos incluyen colores con nombre y códigos de color en formato RGB (#RRGGBB).

Se aplica a