Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom Draw (Read 1851 times)
fabiogiustini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Sep 26th, 2007
Custom Draw
Oct 11th, 2007 at 4:39pm
Print Post  
Hi,
i need to view a little icona near each resource header in resource view calendar.

How can i achieve that? Whit custom draw? Could anyone show me the example vb.net code?

thank you
Fabio
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Custom Draw
Reply #1 - Oct 12th, 2007 at 4:34am
Print Post  
You need to set the Calendar.CustomDraw property to CustomDrawElement.ResourceViewItem then handle the Calendar.Draw event. The following code illustrates the code of a sample event handler:

Code
Select All
Private Sub Calendar1_Draw(ByVal sender As Object, ByVal e As MindFusion.Scheduling.WinForms.CustomDrawArgs) Handles Calendar1.Draw

    If e.Element = MindFusion.Scheduling.WinForms.CustomDrawElements.ResourceViewItem Then

	  e.Graphics.DrawImage(image, e.Bounds.X + 2, e.Bounds.Y + 2)

    End If

End Sub 


The image variable above represents a valid .NET Image.

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