combit List & Label 25 - .NET Online Web Help
DrawDesignerObject Event

combit.ListLabel25 Namespace > DesignerObject Class : DrawDesignerObject Event

After the user has edited the object, you are asked by List & Label to draw the object. The event DrawDesignerObject is triggered for this purpose. A Graphics object and the rectangle of the object are passed through EventArguments. Now, you can draw in the work area with the known GDI + methods. While doing so, access to the underlying object properties is naturally possible and useful. The sample listing shows the presentation of graphic file selected above.

Public Event DrawDesignerObject As DrawDesignerObjectHandler
public event DrawDesignerObjectHandler DrawDesignerObject
event DrawDesignerObjectHandler^ DrawDesignerObject
Event Data

The event handler receives an argument of type DrawDesignerObjectEventArgs containing data related to this event. The following DrawDesignerObjectEventArgs properties provide information specific to this event.


Rectangle of the object.


Graphics object of the designer object. You can draw in the work space using the usual GDI + methods.

Returns 'true' if the view in the Designer is 'Layout' or 'Layout Preview'. You can control if only the first page of the Designer object has to be drawn in design mode. If 'false' is returned, it means that you are in print mode and drawing has to be made for the complete Designer object.  
With this property List & Label is notified that no further data for the Designer object is available for printing and that List & Label is not asking for them anymore by DrawDesignerObject or GetFieldHeightInformation.  

private void designerObject1_DrawDesignerObject(object sender, DrawDesignerObjectEventArgs e)


     DesignerObject desobj = (DesignerObject) sender;



          string imagefile = desobj.ObjectProperties["imagefile"].ToString();

          e.Graphics.DrawImage(new Bitmap(imagefile), e.ClipRectangle);




Platforms: Windows 7 SP1 - Windows 10 Version 1909, Windows Server 2008 R2 - 2019

See Also