sm_length(field_number)
sm_n_length(field_name)
cut_off = sm_n_length("address1_lne")
cut_off = @widget("address1_lne")->max_data_length
sm_t_shift(field_number)
not_all_displayed = sm_t_shift(:cur_fld)
vars len = @field_num(:cur_fld)->length, \
max_len = @field_num(:cur_fld)->max_data_length
if (len < max_len)
not_all_displayed = 1
else
not_all_displayed = 0
sm_oshift(field_number, shift_offset)
sm_n_oshift(field_name, shift_offset)This function call can be replaced by directly modifying the current_offset property. However, when using the property, the user does need to check to see if the shift would cause the maximum widgth of the field to be exceeded. If the shift is too large, then a jpl error will occur, which would not have occurred when using the sm_oshift function.
call sm_n_oshift("test", shift_over)
vars old_offset = @widget("test")->current_offset, \
max_len = @widget("test")->max_data_length, \
len = @widget("test")->length
if (shift_over < 0)
if (old_offset + shift_over > 0)
@widget("test")->current_offset = old_offset + shift_over
else
@widget("test")->current_offset = 1
else
if ((old_offset + shift_over + len) < max_len)
@widget("test")->current_offset = old_offset + shift_over
else
@widget("test")->current_offset = max_len - len
/* Check if offset is 0 or 1 at beginning!!! */