PowerTools PlusPak for Windows Forms 8.0J
ActiveKeySet プロパティ
使用例 

コントロールで使用するキーセットを取得または設定します。
構文
Public Property ActiveKeySet As String
public string ActiveKeySet {get; set;}

プロパティ値

string データ型。デフォルト値は "Default" です。"Default" をキーとして持つデフォルトのキーセットが存在します。
解説

ActiveKeySetプロパティは、アクティブにするKeySetオブジェクトをキー (識別名) で指定します。

次のサンプルコードは、ActiveKeySetプロパティを設定する方法を示します。 Imports GrapeCity.Win.Bars Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load ' スタイルセットを作成します。 Dim aStyle As ThreeDStyleSet = New ThreeDStyleSet() aStyle.AlignHorizontal = AlignHorizontal.Center aStyle.AlignVertical = AlignVertical.Middle GcClassicFunctionKey1.StyleSets.Add("styleA", aStyle) ' 標準のキーセットを作成します。 Dim aIndex As Integer = GcClassicFunctionKey1.KeySets.Add("Normal") GcClassicFunctionKey1.KeySets(aIndex)(0).Text = "F1 ヘルプ" GcClassicFunctionKey1.KeySets(aIndex)(1).Text = "F2" GcClassicFunctionKey1.KeySets(aIndex)(1).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(2).Text = "F3 定型句挿入" GcClassicFunctionKey1.KeySets(aIndex)(3).Text = "F4 繰り返し" GcClassicFunctionKey1.KeySets(aIndex)(4).Text = "F5 ジャンプ" GcClassicFunctionKey1.KeySets(aIndex)(5).Text = "F6 切り替え" GcClassicFunctionKey1.KeySets(aIndex)(6).Text = "F7 スペルチェック" GcClassicFunctionKey1.KeySets(aIndex)(7).Text = "F8" GcClassicFunctionKey1.KeySets(aIndex)(7).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(8).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(8).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(9).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(9).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(10).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(10).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(11).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(11).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(12).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(12).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(13).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(13).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(14).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(14).Enabled = False GcClassicFunctionKey1.KeySets(aIndex)(15).ButtonIndex = -1 GcClassicFunctionKey1.KeySets(aIndex)(15).Enabled = False ' 作成したスタイルセットとキーセットをアクティブにします。 GcClassicFunctionKey1.ActiveStyleSet = "styleA" GcClassicFunctionKey1.ActiveKeySet = "Normal" GcClassicFunctionKey1.ColumnGroups = "8" End Sub using GrapeCity.Win.Bars; private void Form1_Load(object sender, System.EventArgs e) { // スタイルセットを作成します。 ThreeDStyleSet aStyle = new ThreeDStyleSet(); aStyle.AlignHorizontal = AlignHorizontal.Center; aStyle.AlignVertical = AlignVertical.Middle; gcClassicFunctionKey1.StyleSets.Add("styleA",aStyle); // 標準のキーセットを作成します。 int aIndex = gcClassicFunctionKey1.KeySets.Add("Normal"); gcClassicFunctionKey1.KeySets[aIndex][0].Text = "F1 ヘルプ"; gcClassicFunctionKey1.KeySets[aIndex][1].Text = "F2"; gcClassicFunctionKey1.KeySets[aIndex][1].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][2].Text = "F3 定型句挿入"; gcClassicFunctionKey1.KeySets[aIndex][3].Text = "F4 繰り返し"; gcClassicFunctionKey1.KeySets[aIndex][4].Text = "F5 ジャンプ"; gcClassicFunctionKey1.KeySets[aIndex][5].Text = "F6 切り替え"; gcClassicFunctionKey1.KeySets[aIndex][6].Text = "F7 スペルチェック"; gcClassicFunctionKey1.KeySets[aIndex][7].Text = "F8"; gcClassicFunctionKey1.KeySets[aIndex][7].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][8].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][8].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][9].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][9].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][10].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][10].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][11].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][11].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][12].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][12].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][13].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][13].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][14].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][14].Enabled = false; gcClassicFunctionKey1.KeySets[aIndex][15].ButtonIndex = -1; gcClassicFunctionKey1.KeySets[aIndex][15].Enabled = false; // 作成したスタイルセットとキーセットをアクティブにします。 gcClassicFunctionKey1.ActiveStyleSet = "styleA"; gcClassicFunctionKey1.ActiveKeySet = "Normal"; gcClassicFunctionKey1.ColumnGroups = "8"; }
使用例
次のサンプルコードは、ActiveKeySetプロパティを設定する方法を示します。
Imports GrapeCity.Win.Bars

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ' スタイルセットを作成します。
    Dim aStyle As ThreeDStyleSet = New ThreeDStyleSet()
    aStyle.AlignHorizontal = AlignHorizontal.Center
    aStyle.AlignVertical = AlignVertical.Middle
    GcClassicFunctionKey1.StyleSets.Add("styleA", aStyle)

    ' 標準のキーセットを作成します。
    Dim aIndex As Integer = GcClassicFunctionKey1.KeySets.Add("Normal")
    GcClassicFunctionKey1.KeySets(aIndex)(0).Text = "F1 ヘルプ"
    GcClassicFunctionKey1.KeySets(aIndex)(1).Text = "F2"
    GcClassicFunctionKey1.KeySets(aIndex)(1).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(2).Text = "F3 定型句挿入"
    GcClassicFunctionKey1.KeySets(aIndex)(3).Text = "F4 繰り返し"
    GcClassicFunctionKey1.KeySets(aIndex)(4).Text = "F5 ジャンプ"
    GcClassicFunctionKey1.KeySets(aIndex)(5).Text = "F6 切り替え"
    GcClassicFunctionKey1.KeySets(aIndex)(6).Text = "F7 スペルチェック"
    GcClassicFunctionKey1.KeySets(aIndex)(7).Text = "F8"
    GcClassicFunctionKey1.KeySets(aIndex)(7).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(8).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(8).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(9).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(9).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(10).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(10).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(11).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(11).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(12).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(12).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(13).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(13).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(14).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(14).Enabled = False
    GcClassicFunctionKey1.KeySets(aIndex)(15).ButtonIndex = -1
    GcClassicFunctionKey1.KeySets(aIndex)(15).Enabled = False

    ' 作成したスタイルセットとキーセットをアクティブにします。
    GcClassicFunctionKey1.ActiveStyleSet = "styleA"
    GcClassicFunctionKey1.ActiveKeySet = "Normal"
    GcClassicFunctionKey1.ColumnGroups = "8"
End Sub
using GrapeCity.Win.Bars;

private void Form1_Load(object sender, System.EventArgs e)
{
    // スタイルセットを作成します。
    ThreeDStyleSet aStyle = new ThreeDStyleSet();
    aStyle.AlignHorizontal = AlignHorizontal.Center;
    aStyle.AlignVertical = AlignVertical.Middle;
    gcClassicFunctionKey1.StyleSets.Add("styleA",aStyle);

    // 標準のキーセットを作成します。
    int aIndex = gcClassicFunctionKey1.KeySets.Add("Normal");
    gcClassicFunctionKey1.KeySets[aIndex][0].Text = "F1 ヘルプ";
    gcClassicFunctionKey1.KeySets[aIndex][1].Text = "F2";
    gcClassicFunctionKey1.KeySets[aIndex][1].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][2].Text = "F3 定型句挿入";
    gcClassicFunctionKey1.KeySets[aIndex][3].Text = "F4 繰り返し";
    gcClassicFunctionKey1.KeySets[aIndex][4].Text = "F5 ジャンプ";
    gcClassicFunctionKey1.KeySets[aIndex][5].Text = "F6 切り替え";
    gcClassicFunctionKey1.KeySets[aIndex][6].Text = "F7 スペルチェック";
    gcClassicFunctionKey1.KeySets[aIndex][7].Text = "F8";
    gcClassicFunctionKey1.KeySets[aIndex][7].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][8].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][8].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][9].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][9].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][10].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][10].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][11].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][11].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][12].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][12].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][13].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][13].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][14].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][14].Enabled = false;
    gcClassicFunctionKey1.KeySets[aIndex][15].ButtonIndex = -1;
    gcClassicFunctionKey1.KeySets[aIndex][15].Enabled = false;

    // 作成したスタイルセットとキーセットをアクティブにします。
    gcClassicFunctionKey1.ActiveStyleSet = "styleA";
    gcClassicFunctionKey1.ActiveKeySet = "Normal";
    gcClassicFunctionKey1.ColumnGroups = "8";
}
プラットフォーム

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

参照

GcClassicFunctionKey クラス
GcClassicFunctionKey メンバ

Send Feedback