カラー プロパティを構築する ColorBuilder を起動します。
Function BuildColor( _
ByVal owner As Control, _ ByVal initialColor As String _) As String
[C#]
string BuildColor(
Controlowner,stringinitialColor);
[C++]
String* BuildColor(
Control* owner,String* initialColor);
[JScript]
function BuildColor(
owner : Control,initialColor : String) : String;
パラメータ
- owner
ColorBuilder によって表示されるダイアログの親として使用されるコントロール。 - initialColor
エディタが事前選択する初期色。
戻り値
選択された色。この値は名前付きの色、または HTML カラー形式 (#RRGGBB) で表現された RGB 色になります。
解説
initialColor パラメータは、名前付きの色、または HTML カラー形式 (#RRGGBB) で表現された RGB 色になります。
使用例
' Obtain an instance of an IWebFormsBuilderUIService.
Dim builderService As IWebFormsBuilderUIService = _
CType(Me.Component.Site.GetService(GetType(IWebFormsBuilderUIService)), _
IWebFormsBuilderUIService)
' Return from method if the service was not obtained.
If builderService Is Nothing Then
Return
End If
' Create a parent control.
Dim c As New System.Windows.Forms.Control()
c.CreateControl()
' Start the color builder using the specified control
' parent and an initial HTML format ("RRGGBB") color string.
builderService.BuildColor(c, "405599")
[C#]
// Obtain an instance of an IWebFormsBuilderUIService.
IWebFormsBuilderUIService builderService = (IWebFormsBuilderUIService)this.Component.Site.GetService(
typeof(IWebFormsBuilderUIService));
// Return from method if the service was not obtained.
if( builderService == null )
return;
// Create a parent control.
System.Windows.Forms.Control c = new System.Windows.Forms.Control();
c.CreateControl();
// Start the color builder using the specified control
// parent and an initial HTML format ("RRGGBB") color string.
builderService.BuildColor(c, "405599");
[C++]
// Obtain an instance of an IWebFormsBuilderUIService.
IWebFormsBuilderUIService* builderService =
dynamic_cast<IWebFormsBuilderUIService*>(this->Component->Site->GetService(__typeof(IWebFormsBuilderUIService)));
// Return from method if the service was not obtained.
if (builderService == 0)
return;
// Create a parent control.
System::Windows::Forms::Control* c = new System::Windows::Forms::Control();
c->CreateControl();
// Start the color builder using the specified control
// parent and an initial HTML format (S"RRGGBB") color string.
builderService->BuildColor(c, S"405599");
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- 直前の呼び出し元の完全信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細の参照先 : 部分信頼コードからのライブラリの使用
参照
IWebFormsBuilderUIService インターフェイス | IWebFormsBuilderUIService メンバ | System.Web.UI.Design 名前空間