dbicDigit Send comments on this topic.
Developing with dbicDigit - User Drawn Character

Glossary Item Box

A User Drawn Character allows the developer to take over complete control of the character presentation in the control. 

The User Drawn Character event fires before a character is painted in the control.  The event passes an e argument that contains the following custom properties …

·        e.Character (of type Char): The character from the control's Text property.

·        e.Graphics (of type System.Drawing.Graphics): A handle to the graphics object responsible for drawing the control. Through the e.Graphics object the developer has access to the GDI+ methods for drawing objects to a display device.

·        e.IsValid (of type Boolean): Determines if the current character is a valid one the control can display. A value of false indicates that the control will not be rendering anything for this character in the display.

·        e.PaintCharacter (of type Boolean): Determines if the internal routines of the control should draw the character. When the PaintCharacter property is set to False the control does not execute its internal paint routine and the developer has control over the painting of the character.

·        e.Position (of type Integer): The 0-based index of the character within the string assigned to the control's Text property.

·        e.Rect (of type System.Drawing.Rectangle): A rectangle representing the area being painted in the control. The rectangle is defined by an X,Y coordinate (top left of rectangle) and a width and height of the area being painted.  All values are in pixels.