ActiveReports 6 Online Help
SelectionChanged Event
Example 

Raised when the selection changes.
Syntax
'Declaration
 
Public Event SelectionChanged As SelectionChangedEventHandler
public event SelectionChangedEventHandler SelectionChanged
Remarks
You can use the Selection property to inspect the current selection.
Example
// ardMain_SelectionChanged - runs when a control/section in the layout is selected

private void ardMain_SelectionChanged()
{
    //Update the property grid with the new control/section properties
    this.SelChangePropGrid();
            
    if(this._controlAdded)  //Control is newly added
    {
        //Add item to ComboBox and PropGrid
        this._isCboDirty = true;
        this._controlAdded = false;
    }
        
    if(this._controlDeleted)  //Control is newly deleted
    {
        this._isCboDirty = true;
    }

    if(this._sectionAdded)  //Section is newly added
    {
        this._isCboDirty = true;
    }

    if(this._sectionDeleted)  //Section is newly deleted
    {
        this._isCboDirty = true;
    }
}
'ardMain_SelectionChanged - runs when a control/section in the layout is selected
Private Sub ardMain_SelectionChanged() Handles ardMain.SelectionChanged
    'Update the property grid with the new control/section properties
    Me.SelChangePropGrid()

    If Me._controlAdded Then 'Control is newly added
        'Add item to ComboBox and PropGrid
        Me._isCboDirty = True
        Me._controlAdded = False
    End If

    If Me._controlDeleted Then 'Control is newly deleted
        Me._isCboDirty = True
    End If

    If Me._sectionAdded Then 'Section is newly added
        Me._isCboDirty = True
    End If

    If Me._sectionDeleted Then 'Section is newly deleted
        Me._isCboDirty = True
    End If
End Sub 'ardMain_SelectionChanged
Requirements

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

See Also

Reference

Designer Class
Designer Members

Walkthroughs

Creating a Basic End User Report Designer

Send Feedback