I have 2 FXTextFields with data targets for the string values in each. I
would like to set the value of the second field to the value of the
first 10 characters in the first field if it is empty. Can anyone
suggest a way I might achieve this. I would also like to limit the
second field to a max of 10 characters and ensure that they are all in
uppercase. Any help or pointers would be appreciated.
In case it helps, here is a snippet of the code I currently have:
@desc = FXDataTarget.new("")
@sname = FXDataTarget.new("")
FXLabel.new(matrix, “&Description”, nil,
LAYOUT_CENTER_Y|LAYOUT_CENTER_X|JUSTIFY_RIGHT|LAYOUT_FILL_ROW)
txtDesc = FXTextField.new(matrix, 50, @desc, FXDataTarget::ID_VALUE)
FXLabel.new(matrix, “&Short Name”, nil,
LAYOUT_CENTER_Y|LAYOUT_CENTER_X|JUSTIFY_RIGHT|LAYOUT_FILL_ROW)
txtSname = FXTextField.new(matrix, 10, @sname, FXDataTarget::ID_VALUE)