Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Showclocks (Read 3001 times)
Christiaan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 6
Joined: Apr 23rd, 2015
Showclocks
May 4th, 2015 at 3:24pm
Print Post  
Hi

Is there an way to change the SHOWCLOCK icon to show the time in text format?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Showclocks
Reply #1 - May 5th, 2015 at 6:30am
Print Post  
Hi,

You can display the time of the item using custom drawing. To do that, set Calendar.CustomDraw to CustomDrawElements.CalendarItem and handle the Calendar.Draw event. Below you can find a sample implementation

Code
Select All
Private Sub Calendar1_Draw(ByVal sender As System.Object, ByVal e As DrawEventArgs) Handles Calendar1.Draw
	Dim time As String = e.Item.StartTime.ToString("H:mm")
	Dim textBrush As New SolidBrush(e.Style.TextColor)
	e.Graphics.DrawString(time, e.Style.Font, textBrush, e.Bounds.X, e.Bounds.Y)
	textBrush.Dispose()
End Sub 


Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint