Method: CDK::SCALE#setEditPosition

Defined in:
lib/cdk/scale.rb

#setEditPosition(new_position) ⇒ Object

Set the edit position. Normally the cursor is one cell to the right of the editable field. Moving it left over the field allows the user to modify cells by typing in replacement characters for the field’s value.



208
209
210
211
212
213
214
215
216
217
218
# File 'lib/cdk/scale.rb', line 208

def setEditPosition(new_position)
  if new_position < 0
    CDK.Beep
  elsif new_position == 0
    @field_edit = new_position
  elsif self.validEditPosition(new_position)
    @field_edit = new_position
  else
    CDK.Beep
  end
end