You could only set two of the three horizonal dimension properties (boxLeft, boxRight, boxWidth) at the same time. This will be omitted during the setup of the new third value. To reset a value you didn't want anymore, set it to null.
Get current value.
QxWidget.getRight();
Set new value.
QxWidget.setRight(newValue);