# Sticky Buttons

DsPdf is a Document Solutions product that offers a rich library to read, create, modify, and save PDF files without using any external tool.

## Content

DsPdfViewer lets you add the **stickyBehavior** setting to the **toolbarLayout** property to set sticky behavior on button keys of the annotation or form editor, so that you can select the annotation or form field from the toolbar and draw it on PDF multiple times, without going back to the toolbar and selecting again.
![](https://cdn.mescius.io/document-site-files/images/884d2bfb-301b-49bc-8d90-656c5b910507/images/sticky-buttons-gif.gif)
The following table provides a list of supported annotation and form fields:

| **Supported Annotation Editor Keys** |  |  |  |
| -------------------------------- | --- | --- | --- |
| edit-sign-tool | edit-text | edit-free-text | edit-ink |
| edit-square | edit-circle | edit-line | edit-polyline |
| edit-polygon | edit-stamp | edit-file-attachment | edit-sound |
| edit-link | edit-redact |  |  |

| **Supported Form Editor Keys** |  |  |  |
| -------------------------- | --- | --- | --- |
| edit-widget-tx-field | edit-widget-tx-password | edit-widget-tx-text-area | edit-widget-btn-checkbox |
| edit-widget-btn-radio | edit-widget-btn-push | edit-widget-ch-combo | edit-widget-ch-list-box |
| edit-widget-tx-comb | edit-widget-btn-submit | edit-widget-btn-reset |  |

The code snippet below shows how to set sticky buttons in the DsPdfViewer.

```javascript
// Set the sticky behavior for drawing annotations and form widgets:
viewer.toolbarLayout.stickyBehavior = ['edit-ink', 'edit-square', 'edit-circle', 'edit-line', 'edit-polyline', 'edit-polygon', "edit-redact",
"edit-widget-tx-field", "edit-widget-tx-text-area", "edit-widget-btn-push", "edit-widget-btn-checkbox", "edit-widget-btn-radio"];
viewer.applyToolbarLayout();
```