Actions

Floating objects support a variety of actions, including drag drop, resize, move, copy, paste, and so on. You can try out the actions listed in the description on the floating objects in the JavaScript spreadsheet below.

The following keys provide actions for working with the floating object: Esc: If you select multiple floating objects, and then press Esc, all the floating objects will be deselected. Delete: Select multiple floating objects, then press Delete, and the selected floating objects will be deleted. Tab: Select a floating object, then press Tab to navigate to the next floating object and select it. Shift+Tab: Select a floating object, then press Shift+Tab to navigate to the previous floating object and select it. Ctrl+X: Select multiple floating objects, then press Ctrl+X, and the selected floating objects will be cut to the Clipboard. Ctrl+C: Select multiple floating objects, then press Ctrl+C, and the selected floating object will be copied to the Clipboard. Ctrl+V: Select a cell, then press Ctrl+V to paste from the Clipboard. Ctrl+A: Select a floating object, then press Ctrl+A to select all the floating objects. Up: Select some floating objects, then press the Up arrow to move the selected floating objects up. Down: Select some floating objects, then press the Down arrow to move the selected floating objects down. Left: Select some floating objects, then press the Left arrow to move the selected floating objects to the left. Right: Select some floating objects, then press the Right arrow to move the selected floating objects to the right. You can also interact with the floating object using mouse actions. When you select a floating object, a position indicator and eight resize indicators are displayed. You can drag the resize indicator to resize the floating object. You can also drag the floating object and drop it in another position. You can drag and copy and paste the floating objects by pressing the Ctrl key while dragging the floating object with the mouse. After you release the mouse the dragged floating objects will be copied and pasted.
window.onload = function () { var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss")); initSpread(spread); }; function initSpread(spread) { var sheet = spread.getSheet(0); sheet.pictures.add("f1", "$DEMOROOT$/spread/source/images/splogo.png", 50, 0, 100, 100); sheet.pictures.add("f2", "$DEMOROOT$/spread/source/css/images/Food.png", 50, 120, 100, 100); sheet.pictures.add("f3", "$DEMOROOT$/spread/source/css/images/Calories.png", 50, 240, 100, 100); };
<!doctype html> <html style="height:100%;font-size:14px;"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="$DEMOROOT$/en/purejs/node_modules/@grapecity/spread-sheets/styles/gc.spread.sheets.excel2013white.css"> <script src="$DEMOROOT$/en/purejs/node_modules/@grapecity/spread-sheets/dist/gc.spread.sheets.all.min.js" type="text/javascript"></script> <script src="$DEMOROOT$/spread/source/js/license.js" type="text/javascript"></script> <script src="app.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <div class="sample-tutorial"> <div id="ss" style="width: 100%; height: 100%"></div> </div> </body> </html>
.sample-tutorial { position: relative; height: 100%; overflow: hidden; } body { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }