combit List & Label 25 - .NET Online Web Help
EditDesignerObjectHandler Delegate


combit.ListLabel25 Namespace : EditDesignerObjectHandler Delegate

This event is triggered, when the user double clicks on the newly added object or selects the item "Properties" from the context menu. Here as well, you can gain access to the designer window through event arguments, and a separate dialog can be displayed. In the example, you see the display of a file selection dialog. Here, you can choose a graphic to be displayed in the designer. The dialog is displayed by double-clicking on the object.

Syntax
'Declaration
 
Public Delegate Sub EditDesignerObjectHandler( _
   ByVal sender As Object, _
   ByVal e As EditDesignerObjectEventArgs _
) 
public delegate void EditDesignerObjectHandler( 
   object sender,
   EditDesignerObjectEventArgs e
)
public delegate void EditDesignerObjectHandler( 
   Object^ sender,
   EditDesignerObjectEventArgs^ e
)

Parameters

sender
e
Example
private void designerObject1_EditDesignerObject(object sender, EditDesignerObjectEventArgs e)

{

     DesignerObject desobj = (DesignerObject) sender;

     OpenFileDialog dialog = new OpenFileDialog();

     dialog.Filter = "JPEG files (*.jpg)|*.jpg|All files (*.*)|*.*";

     if(desobj.ObjectProperties.Contains("imagefile"))

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



     if(dialog.ShowDialog(e.DesignerWindow) == DialogResult.OK)

     {

          desobj.ObjectProperties["imagefile"] = dialog.FileName;

          e.HasChanged = true;

     }

}
Requirements

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

See Also

Reference

EditDesignerObjectHandler Members
combit.ListLabel25 Namespace