windowsforms-devexpress-dot-xtrascheduler-dot-timelineviewappointmentdisplayoptionsex-1d7d6ce0.md
Gets or sets whether Timeline View appointments should draw their text strings even when there is not enough space to do that.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.dll
NuGet Package : DevExpress.Win.Scheduler
[DefaultValue(false)]
[XtraSerializableProperty]
public bool ShowClippedText { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Property ShowClippedText As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true , to draw strings when appointments have not enough height; false to hide text strings.
|
You can access this nested property as listed below:
| Object Type | Path to ShowClippedText |
|---|---|
| TimelineView |
.AppointmentDisplayOptions .ShowClippedText
|
Scheduler control hides appointment images and text strings if an appointment is too small to display this content. Images hide when there is not enough either vertical or horizontal space.
How to provide appointment images
In the animation above, images for all appointments labeled as “Important” are assigned on the SchedulerControl.InitAppointmentImages event.
private void SchedulerControl_InitAppointmentImages(object sender, AppointmentImagesEventArgs e) {
if (Object.Equals(e.Appointment.LabelKey, 1)) { //"Important" label
AppointmentImageInfo info = new AppointmentImageInfo();
info.Image = SystemIcons.Warning.ToBitmap();
e.ImageInfoList.Add(info);
}
}
Private Sub SchedulerControl_InitAppointmentImages(ByVal sender As Object, ByVal e As AppointmentImagesEventArgs)
If Object.Equals(e.Appointment.LabelKey, 1) Then '"Important" label
Dim info As New AppointmentImageInfo()
info.Image = SystemIcons.Warning.ToBitmap()
e.ImageInfoList.Add(info)
End If
End Sub
Appointment text hides only when it does not fit vertically. In Timeline and Month Views, this can happen when you manually reduce the appointment height.
schedulerControl1.MonthView.AppointmentDisplayOptions.AppointmentHeight = 15;
schedulerControl1.MonthView.AppointmentDisplayOptions.AppointmentHeight = 15
In Day and Week Views, text hides if the font is higher than a time cell.
How to enlarge appointment text
Time cells in Day and Week Views adapt to appointment font settings when you set them through the BaseViewAppearance.Appointment object. For that reason, cells can be lacking height only when you change font settings dynamically, i.e. on the SchedulerControl.AppointmentViewInfoCustomizing event.
private void SchedulerControl_AppointmentViewInfoCustomizing(object sender, AppointmentViewInfoCustomizingEventArgs e) {
e.ViewInfo.Appearance.FontSizeDelta = 10;
}
Private Sub SchedulerControl_AppointmentViewInfoCustomizing(ByVal sender As Object, ByVal e As AppointmentViewInfoCustomizingEventArgs)
e.ViewInfo.Appearance.FontSizeDelta = 10
End Sub
To force appointments to draw their texts and images even when there is not enough space, enable the ShowClippedText and ShowClippedImages settings.
You can access these settings through the View’s AppointmentDisplayOptions. For instance, for Day View:
schedulerControl1.DayView.AppointmentDisplayOptions.ShowClippedImages = true;
schedulerControl1.DayView.AppointmentDisplayOptions.ShowClippedText = true;
schedulerControl1.DayView.AppointmentDisplayOptions.ShowClippedImages = True
schedulerControl1.DayView.AppointmentDisplayOptions.ShowClippedText = True
See Also
TimelineViewAppointmentDisplayOptionsEx Class