IToolboxUser.GetToolSupported メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IToolboxUser.GetToolSupported メソッドの意味・解説 

IToolboxUser.GetToolSupported メソッド

指定したツール現在のデザイナサポートされているかどうかを示す値を取得します

名前空間: System.Drawing.Design
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Function GetToolSupported ( _
    tool As ToolboxItem _
) As Boolean
Dim instance As IToolboxUser
Dim tool As ToolboxItem
Dim returnValue As Boolean

returnValue = instance.GetToolSupported(tool)
bool GetToolSupported (
    ToolboxItem tool
)
bool GetToolSupported (
    ToolboxItem^ tool
)
boolean GetToolSupported (
    ToolboxItem tool
)
function GetToolSupported (
    tool : ToolboxItem
) : boolean

パラメータ

tool

ツールボックスサポートされているかどうかテストする対象の ToolboxItem。

戻り値
ツールボックスツールサポートされていて有効にできる場合trueドキュメント デザイナツール使用方法認識されない場合false

解説解説

IToolboxUser を実装するデザイナで、指定したツールサポートされている場合は、そのデザイナフォーカス取得したときに、そのツールツールボックス内で有効になりますそれ以外場合ツール無効になりますツールが有効または無効としてマークされた後は、同じデザイナでそのツールサポートされているかどうかを再テストすることはできません。

使用例使用例

GetToolSupported メソッド実装例次に示します

' This method can signal whether to enable or disable the specified
' ToolboxItem when the component associated with this designer is selected.
Function GetToolSupported(ByVal tool As
 ToolboxItem) As Boolean Implements
 IToolboxUser.GetToolSupported
    ' Search the blocked type names array for the type name of the tool
    ' for which support for is being tested. Return false to indicate
 the
    ' tool should be disabled when the associated component is selected.
    Dim i As Integer
    For i = 0 To blockedTypeNames.Length -
 1
        If tool.TypeName = blockedTypeNames(i) Then
            Return False
        End If
    Next i ' Return true to indicate support for
 the tool, if the type name of the
    ' tool is not located in the blockedTypeNames string array.
    Return True
End Function
// This method can signal whether to enable or disable the specified
// ToolboxItem when the component associated with this designer is selected.
bool IToolboxUser.GetToolSupported(ToolboxItem tool)
{       
    // Search the blocked type names array for the type name of the
 tool
    // for which support for is being tested. Return false to indicate
 the
    // tool should be disabled when the associated component is selected.
    for( int i=0; i<blockedTypeNames.Length;
 i++ )
        if( tool.TypeName == blockedTypeNames[i] )
            return false;
    
    // Return true to indicate support for the tool, if the type name
 of the
    // tool is not located in the blockedTypeNames string array.
    return true;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IToolboxUser インターフェイス
IToolboxUser メンバ
System.Drawing.Design 名前空間
ToolboxItem



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「IToolboxUser.GetToolSupported メソッド」の関連用語

IToolboxUser.GetToolSupported メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IToolboxUser.GetToolSupported メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS