[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Menus' (#lcl)

# TMenuItem.AssignTo

Copies property values from the current class instance to the specified destination.

## Declaration

Source position: menus.pp line 228

`protected procedure TMenuItem.AssignTo(`
`Dest: TPersistent`
`); override;`

## Arguments

`Dest` |  | Action or menu item where values are stored in the method.

## Description

AssignTo is an overridden method in TMenuItem used to copy property values from the current class instance to the destination specified in Dest. Dest can be either a TCustomAction instance or a TMenuItem instance.

When Dest is a TCustomAction descendant, the following properties are copied into the destination:

- Caption
- Enabled
- HelpContext
- Hint
- ImageIndex
- Visible

When Dest is a TMenuItem descendant, an implementation routine is called to transfer values between the TMenuItem instances.

If Dest is not a TMenuItem or a TCustomAction instance, the inherited AssignTo method is called.

## See also

TPersistent.Assign