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


combit.ListLabel25 Namespace > DesignerObject Class : EditDesignerObject Event

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 Event EditDesignerObject As EditDesignerObjectHandler
public event EditDesignerObjectHandler EditDesignerObject
public:
event EditDesignerObjectHandler^ EditDesignerObject
Event Data

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

PropertyDescription

Access to the designer window.

 
Set to indicate if the object has been changed.  
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