Posted 19 years ago by tobias weltner
Avatar
Could someone provide a sample on how to create a new line indicator with an icon in the margin bar, in vb.net?
I managed to use the predefined indicators and understand that I basically have to inherit from them. But what I do not know is how to draw an icon or even set the background color.
Thanks!

Comments (3)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
This post (read our reply) has some info for doing the background color in VB.NET:
http://www.actiprosoftware.com/Support/Forums/ViewForumTopic.aspx?ForumTopicID=815#2722

The drawing of the icon is done by doing this:
Protected Overrides Sub DrawGlyph(ByVal g As System.Drawing.Graphics, ByVal bounds As System.Drawing.Rectangle) 
    'Paint here
End Sub


Actipro Software Support

Posted 19 years ago by tobias weltner
Avatar
Thanks!
I was hoping to get pointed to a code snippet that actually uses DrawGlyph to draw an icon out of an image list for example. I am new to .net and not really proficient when it comes to drawing something, but from what I learned so far it must be quite easy...

I'll dig into it... ;-)
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You just need to look into the Graphics object. That has methods like DrawImage that you would use to draw an Image from an ImageList.


Actipro Software Support

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.