Implement setSize and prevent resizing

It's now possible to set the size of the selection and prevent the resizing.