add a task to a custom Snippets palette - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Document Tools : DocumentTools/AddPaletteEntry

DocumentTools[AddPaletteEntry] - add a task to a custom Snippets palette

Calling Sequence

AddPaletteEntry(entry, palette=palette_name, icon=icon_name)




string ; the name of the task to add to the custom Snippets palette



string ; the name of the Snippets palette that entry will be added to



(optional) string ; the name of the icon to associate with entry



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.


Once 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].



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 left palette pane.

AddPaletteEntryTask_1,palette=My first palette

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.

AddPaletteMy second palette,location=right,position=top

AddIconTask 2 icon,path=/where/the/icon/file/is.png

AddPaletteEntryTask_2,palette=My second palette,icon=Task 2 icon

See Also

DocumentTools, DocumentTools[AddIcon], DocumentTools[AddPalette], DocumentTools[RemovePaletteEntry], Task Template, worksheet/expressions/createpalette, worksheet/help/creatingtasks

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam