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 va a usar para acceder a los servicios en tiempo de diseño.

owner
Control

que Control se usa para primario la ventana del selector.

initialColor
String

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

Devoluciones

El valor de color, representado como una cadena en un formato de color HTML, o null si no se pudo recuperar el servicio del generador.

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 es null, 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