DocumentTools

Parameters

 entry - string ; the name of the task to add to the custom Snippets palette palette_name - string ; the name of the Snippets palette that entry will be added to icon_name - (optional) string ; the name of the icon to associate with entry

Description

 • The AddPaletteEntry command adds a task to a Snippets palette. If the palette does not already exist, it  will be created using the default option values. See DocumentTools[AddPalette] for information on creating a Snippets palette.
 • The task added to the palette must first be created and saved as a Task Template.
 • If the optional icon=icon_name parameter is not provided, a default text icon is used.  See DocumentTools[AddIcon] for information on how to create icons for this purpose.
 • After the task is added to a palette, the associated task template can be inserted into a worksheet by clicking its icon in the palette.
 • To remove an entry from a palette, use DocumentTools[RemovePaletteEntry].

Examples

 > $\mathrm{with}\left(\mathrm{DocumentTools}\right):$

The palette entry in this first example will have a "text" icon with the name "Task_1".  If the palette "My first palette" does not exist, it will be created and added to the top of the palette dock.

 > $\mathrm{AddPaletteEntry}\left("Task_1",\mathrm{palette}="My first palette"\right)$

For the next example, we first create a palette and store an icon for the task, and then add the task with its icon to the palette.

 > $\mathrm{AddPalette}\left("My second palette",\mathrm{position}="bottom"\right)$
 > $\mathrm{AddIcon}\left("Task 2 icon",\mathrm{path}="/where/the/icon/file/is.png"\right)$
 > $\mathrm{AddPaletteEntry}\left("Task_2",\mathrm{palette}="My second palette",\mathrm{icon}="Task 2 icon"\right)$

Compatibility

 • The DocumentTools[AddPaletteEntry] command was introduced in Maple 16.