Hi,
i am having trouble creating a custom renderer for navisight. i am writting this in vb.net. This is the template code that was insterted the secont i hit enter on the inherits statement
Public Class CustomRenderer
Inherits Divelements.Navisight.Rendering.OfficeRendererBase
Public Overrides Sub DrawImageCore(ByVal image As System.Drawing.Image, ByVal graphics As System.Drawing.Graphics, ByVal state As System.Windows.Forms.DrawItemState, ByVal bounds As System.Drawing.Rectangle)
End Sub
Protected Overrides Sub DrawText(ByVal graphics As System.Drawing.Graphics, ByVal text As String, ByVal font As System.Drawing.Font, ByVal bounds As System.Drawing.Rectangle, ByVal format As System.Drawing.StringFormat, ByVal state As System.Windows.Forms.DrawItemState)
End Sub
Public Overrides Sub PaintButtonHighlight(ByVal graphics As System.Drawing.Graphics, ByVal bounds As System.Drawing.Rectangle, ByVal state As System.Windows.Forms.DrawItemState)
End Sub
Protected Overrides Sub RefreshColors()
End Sub
End Class
in my forms load event i have this code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim r as new CustomRenderer
buttonbar1.Renderer = r
End Sub
this however tells me that "Unable to cast object of type 'WindowsApplication1.CustomRenderer' to type 'Divelements.Navisight.Rendering.INavisightRenderer'."
any ideas how to fix this, or am i doing something completely wrong?
thanks