This is a migrated thread and some comments may be shown as answers.

How to change time color in a appointment

3 Answers 128 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 11 Dec 2015, 11:34 AM

Hi.

How do i change the "time" color in a appointment? I have figured out to change everything else, but not this. See attached file.

3 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 11 Dec 2015, 11:35 AM
PS. In visual basic code, please :-)
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Dec 2015, 02:09 PM
Hello Peter,

Thank you for writing.
 
RadScheduler uses the HTML-like Text Formatting functionality and the time part is formatted to be displayed with gray color. In order to customize it, you can use the following approach:
Sub New()
    InitializeComponent()
     
    Me.RadScheduler1.AppointmentTitleFormat = "{2}"
    Dim app As New Appointment(DateTime.Now, TimeSpan.FromHours(3), "Christmas party")
    Me.RadScheduler1.Appointments.Add(app)
End Sub
 
Private Sub RadScheduler1_AppointmentFormatting(sender As Object, e As SchedulerAppointmentEventArgs) _
    Handles RadScheduler1.AppointmentFormatting
    e.AppointmentElement.ForeColor = Color.Fuchsia
    e.AppointmentElement.Text = e.Appointment.Summary & " " & String.Format("{0:hh:mm:tt}", e.Appointment.Start) + " - " _
    & String.Format("{0:hh:mm:tt}", e.Appointment.End)
End Sub

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Rossi
Top achievements
Rank 1
answered on 17 Nov 2017, 10:32 PM
Excellent. Thank you!!
Tags
Scheduler and Reminder
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Rossi
Top achievements
Rank 1
Share this question
or