ActiveReports.Design6 Assembly > DataDynamics.ActiveReports.Design Namespace > Selection Class : Count Property |
/// <summary> /// SetClassName - sets the ClassName of the selected object to the name in the drop down list /// </summary> private void SetClassName() { for(int i=0;i<this.ardMain.Selection.Count;i++) { string ctl = this.ardMain.Selection[i].GetType().ToString(); if((ctl.IndexOf("TextBox") >0)||(ctl.IndexOf("CheckBox") >0)||(ctl.IndexOf("Label") >0)) { switch(ctl) { case "DataDynamics.ActiveReports.TextBox": //Control type is TextBox ((DataDynamics.ActiveReports.TextBox)this.ardMain.Selection[i]).ClassName = this.cboClassName.Text; break; case "DataDynamics.ActiveReports.Label": //Control type is Label ((DataDynamics.ActiveReports.Label)this.ardMain.Selection[i]).ClassName = this.cboClassName.Text; break; case "DataDynamics.ActiveReprots.CheckBox": //Control type is CheckBox ((DataDynamics.ActiveReports.CheckBox)this.ardMain.Selection[i]).ClassName = this.cboClassName.Text; break; } } } }
'SetClassName - sets the ClassName of the selected object to the name in the drop down list Private Sub SetClassName() Dim i As Integer For i = 0 To (Me.ardMain.Selection.Count) - 1 Dim ctl As String = Me.ardMain.Selection(i).GetType().ToString() If ctl.IndexOf("TextBox") > 0 OrElse ctl.IndexOf("CheckBox") > 0 OrElse ctl.IndexOf("Label") > 0 Then Select Case ctl Case "DataDynamics.ActiveReports.TextBox" 'Control type is TextBox CType(Me.ardMain.Selection(i), DataDynamics.ActiveReports.TextBox).ClassName = Me.cboClassName.Text Case "DataDynamics.ActiveReports.Label" 'Control type is Label CType(Me.ardMain.Selection(i), DataDynamics.ActiveReports.Label).ClassName = Me.cboClassName.Text Case "DataDynamics.ActiveReprots.CheckBox" 'Control type is CheckBox CType(Me.ardMain.Selection(i), DataDynamics.ActiveReports.CheckBox).ClassName = Me.cboClassName.Text End Select End If Next i End Sub 'SetClassName
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