PowerTools ActiveReports for .NET 11.0J
QueryActionChecked メソッド
使用例 

DesignerActionの種類。
1つまたは複数コマンドのチェックステータスをオブジェクトに問い合わせます。
構文
'宣言
 
Public Function QueryActionChecked( _
   ByVal action As DesignerAction _
) As Boolean
public bool QueryActionChecked( 
   DesignerAction action
)

パラメータ

action
DesignerActionの種類。
使用例
/// <summary>
/// SetStatus - DesignerActionに基づいて、toolbuttonの状態を更新する
/// </summary>
/// <param name="action">文字列形式を取得するDesignerAction</param>
/// <param name="toolButton">更新するToolButton</param>
private void SetStatus(string action,System.Windows.Forms.ToolBarButton toolButton)
{
    DesignerAction daAction = GetActionFromString(action);
    //DesignerActionがFileOpenでない場合は、次の動作を行う
    if(daAction != DesignerAction.FileOpen)
    {
        //toolButtonの属性を、DesignerActionに基づいて設定する
        toolButton.Enabled = this.ardMain.QueryActionEnabled(daAction);
        toolButton.Pushed = this.ardMain.QueryActionChecked(daAction);
    }    
}
'SetStatus - DesignerActionに基づいて、toolbuttonの状態を更新する
'Parameter Name: action - 文字列形式を取得するDesignerAction
'Parameter Name: toolButton - 更新するToolButton
Private Sub SetStatus(ByVal action As String, ByVal toolButton As System.Windows.Forms.ToolBarButton)
    Dim daAction As DesignerAction = GetActionFromString(action)
    'DesignerActionがFileOpenでない場合は、次の動作を行う
    If daAction <> DesignerAction.FileOpen Then
        'toolButtonの属性を、DesignerActionに基づいて設定する
        toolButton.Enabled = Me.ardMain.QueryActionEnabled(daAction)
        toolButton.Pushed = Me.ardMain.QueryActionChecked(daAction)
    End If
End Sub 'SetStatus
参照

関連項目

Designer クラス
Designer メンバ
DesignerAction 列挙型

 

 


©2003-2017 GrapeCity inc. All rights reserved.