The basic code to use is this:
if (+this.getField("TextField").value > 10) {
this.getField("CB1").readonly = true;
}
However, you still need to check if the check-box is selected or not... And you need to write a reverse script that changes the box back to editable when the value is lower than 10.