ActiveReports 10
StatusChanged Event
Example 

GrapeCity.ActiveReports.Design.Win.v10 Assembly > GrapeCity.ActiveReports.Design Namespace > Designer Class : StatusChanged Event
This event is raised for each change in the status of the designer actions.
Syntax
'Declaration
 
Public Event StatusChanged As StatusChangedEventHandler
public event StatusChangedEventHandler StatusChanged
Remarks
Designer actions represent the commands that are typically invoked from UI elements such as a toolbar or a menu. You can use the QueryAction methods to check the status of the changed action and update your custom UI elements.
Example
// ardMain_StatusChanged - runs with the status of the Designer has changed
// (button is pressed)

private void ardMain_StatusChanged(object sender, System.EventArgs e)
{
    for(int i=0;i<this.tbAlign.Buttons.Count;i++)
    {
        System.Windows.Forms.ToolBarButton tb = this.tbAlign.Buttons[i];
        if(tb.Tag != null)
        {
            //If Alignment toolbar button is pressed, call SetStatus()
            SetStatus (tb.Tag.ToString(),tb);    
        }
    }
    for(int i=0;i<this.tbFormat.Buttons.Count;i++)
    {
        System.Windows.Forms.ToolBarButton tb = this.tbFormat.Buttons[i];
        if(tb.Tag != null)
        {
            //if Format toolbar button is pressed, call SetStatus()
            SetStatus (tb.Tag.ToString(),tb);    
        }
    }

    //Update Menus and other toolbars
    StatusStandardToolbar();
    UpdateFormatMenus();
}
'ardMain_StatusChanged - runs with the status of the Designer has changed
'(button is pressed)
Private Sub ardMain_StatusChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ardMain.StatusChanged
    Dim i As Integer
    For i = 0 To (Me.tbAlign.Buttons.Count) - 1
        Dim tb As System.Windows.Forms.ToolBarButton = Me.tbAlign.Buttons(i)
        If Not (tb.Tag Is Nothing) Then
            'If Alignment toolbar button is pressed, call SetStatus()
            SetStatus(tb.Tag.ToString(), tb)
        End If
    Next i

    For i = 0 To (Me.tbFormat.Buttons.Count) - 1
        Dim tb As System.Windows.Forms.ToolBarButton = Me.tbFormat.Buttons(i)
        If Not (tb.Tag Is Nothing) Then
            'if Format toolbar button is pressed, call SetStatus()
            SetStatus(tb.Tag.ToString(), tb)
        End If
    Next i

    'Update Menus and other toolbars
    StatusStandardToolbar()
    UpdateFormatMenus()
End Sub 'ardMain_StatusChanged
See Also

Reference

Designer Class
Designer Members

Walkthroughs

Creating a Basic End User Report Designer