Move Picture

From Documentation

Stop.png This article is out of date, please refer to for more up to date information.

Available in ZK Spreadsheet EE only


ZK Spreadsheet uses Range.movePicture (Picture, ClientAnchor) to move the position of the specified picture from the sheet.


<window vflex="1" width="100%" 
    <spreadsheet id="myss" src="/WEB-INF/excel/config/MovePicture.xlsx" maxrows="200"
        maxcolumns="40" vflex="1" width="100%">
    <button id="move" label="Move All Pictures"/>


ZK Spreadsheet use Worksheet.getPictures() to retrieve all pictures in the sheet.

	private Spreadsheet myss;
	public void onClick$move(MouseEvent evt) throws Exception {
		//move picture
		Worksheet sheet = myss.getSelectedSheet();
		Range rng = Ranges.range(sheet);
		for(Picture pic : sheet.getPictures()) { //move picture down two rows
			ClientAnchor anchor = pic.getPreferredSize();
			rng.movePicture(pic, anchor);

View the complete source of ZUML movePicture.zul

View the complete source of composer

Version History

Last Update : 2022/01/19

Version Date Content
2.2.0 Nov. 11, 2011 API to move a picture

All source code listed in this book is at Github.

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.