FieldObject.ApplyFont Méthode
Applique les modifications apportées à l'objet System.Drawing.Font.
[Visual Basic]
Public Overrideable Sub ApplyFont( _
ByVal value As System.Drawing.Font _
)
[C#]
public virtual void ApplyFont(
System.Drawing.Font value
);
Paramètres
- value
Contient les paramètres de police de FieldObject.
Exemple
[VJ#]
private void setFont(String fieldHeadingObjectName)
{
FieldHeadingObject fieldHeading;
FontDialog fieldFont = new FontDialog();
fieldHeading = (FieldHeadingObject)Report.get_ReportDefinition()
.get_ReportObjects().get_Item(fieldHeadingObjectName);
if (fieldHeading != null)
{
if (fieldFont.ShowDialog() == DialogResult.OK)
{
fieldHeading.ApplyFont(fieldFont.get_Font());
fieldHeading.set_Color(Color.get_Blue());
}
}
}
[Visual Basic]
Public Sub SetFont(ByVal reportObjectName As String)
Dim field As FieldObject
Dim fieldFont As New FontDialog()
If TypeOf _
(Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)) Is FieldObject Then
field = _
Report.ReportDefinition.ReportObjects. _
Item(reportObjectName)
If fieldFont.ShowDialog() = DialogResult.OK Then
field.ApplyFont(fieldFont.Font)
field.Color = Color.Blue
End If
End If
End Sub
[C#]
private void SetFont(string reportObjectName)
{
FieldObject field;
FontDialog fieldFont = new FontDialog();
field =
Report.ReportDefinition.ReportObjects[reportObjectName]
as FieldObject;
if (field != null)
{
if (fieldFont.ShowDialog() == DialogResult.OK)
{
field.ApplyFont(fieldFont.Font);
field.Color = Color.Blue;
}
}
}
Configuration requise
Espace de noms CrystalDecisions.CrystalReports.Engine
Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Voir aussi
FieldObject Classe | FieldObject Membres | CrystalDecisions.CrystalReports.Engine Espace de noms
©2005 Business Objects SA. Tous droits réservés.
Business Objects SA. http://www.france.businessobjects.com/ Services de support http://www.businessobjects.com/support/ |