PowerTools InputMan for Windows Forms 8.0J
ShowItemTip プロパティ (GcComboBox)
使用例 

リスト項目の上にマウスポインタがあるときツールチップを表示するか、しないかを取得または設定します。
構文
Public Property ShowItemTip As Boolean
public bool ShowItemTip {get; set;}

プロパティ値

説明
True ツールチップを表示します。
False ツールチップを表示しません。
既定値はFalseです。
解説
このプロパティがtrueの場合、ドロップダウンリストの項目の上にマウスを置くとツールチップが表示されます。
使用例
ステータスバー、オーバーフローチップ、そしてツールチップを設定した GcComboBox コントロールを作成するコード例を次に示します。この例では他に ListDescriptionFormatListDescriptionSubItemIndexStatusBarShowOverflowTip そして ShowItemTip プロパティを使用しています。
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

public void SetStatusBarAndTipSettings()
{
    // Creates the GcComboBox control.
    GcComboBox gcComboBox1 = new GcComboBox();

    // Sets the string format to "Column0:Column1" of the StatusBar.Text as well as the ToolTip text of each list item.
    gcComboBox1.ListDescriptionFormat = "[0] : [1]";

    // Specifies the Column1 as the content for displaying the value of the subitem as statusbar's text as well as the ToolTip text of each list item.
    // But the property will take effect only when the ListDescriptionFormat is not set.
    gcComboBox1.ListDescriptionSubItemIndex = 1;

    // Shows the statusbar.
    gcComboBox1.StatusBar.Visible = true;
    // Shows tool tip for each list item when mouse move to it.
    gcComboBox1.ShowItemTip = true;
    // Shows overflow tip both on the edit box and each sub item.
    gcComboBox1.ShowOverflowTip = true;
}
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Public Sub SetStatusBarAndTipSettings()
    ' Creates the GcComboBox control.
    Dim gcComboBox1 As New GcComboBox()

    ' Sets the string format to "Column0:Column1" of the StatusBar.Text as well as the ToolTip text of each list item.
    gcComboBox1.ListDescriptionFormat = "[0] : [1]"

    ' Specifies the Column1 as the content for displaying the value of the subitem as statusbar's text as well as the ToolTip text of each list item.
    ' But the property will take effect only when the ListDescriptionFormat is not set.
    gcComboBox1.ListDescriptionSubItemIndex = 1

    ' Shows the statusbar.
    gcComboBox1.StatusBar.Visible = True
    ' Shows tool tip for each list item when mouse move to it.
    gcComboBox1.ShowItemTip = True
    ' Shows overflow tip both on the edit box and each sub item.
    gcComboBox1.ShowOverflowTip = True
End Sub
参照

GcComboBox クラス
GcComboBox メンバ
ShowOverflowTip プロパティ

 

 


© 2004-2015 GrapeCity inc. All rights reserved.