PROCEDURE EXPOSE wdw_size. window_size guiwindow resize_error;
PARSE ARG control
guierr = "SYNTAX"
guiheading = 1
IF WORDS(window_size) \= 4 THEN
DO
rc = wdwsay.rex('Invalid definition in window_size 'window_size, 'STOP')
RETURN 0
END
PARSE VAR window_size wdw_old_x wdw_old_y wdw_new_x wdw_new_y
rc = change_controls(control)
SAY 'We are in test_wm_size.rex'
RETURN 0
change_controls:
PARSE ARG control
SAY 'In change_controls'
resize_error = ''
oldx = wdw_old_x
newx = wdw_new_x
oldy = wdw_old_y
newy = wdw_new_y
DO i = 1 TO wdw_size.0
IF i = 6 THEN
NOP
PARSE VAR wdw_size.i next_ctrl handle x_pos y_pos x_size y_size ,
resize x_change y_change bx_change by_change
sw_resize = 1
SELECT
WHEN TRANSLATE(next_ctrl) = 'UNDEFINED_CONTROL' THEN
sw_resize = 0
WHEN control <> "" & next_ctrl <> control THEN
sw_resize = 0
WHEN resize = 'M' THEN
rc = move_the_field('M')
WHEN resize = 'S' THEN
rc = resize_the_field('S')
WHEN resize = 'B' THEN
DO
rc = move_the_field('M')
rc = resize_the_field('B')
END
OTHERWISE
DO
temp = 'Group 'i' contains an invalid size variable',
'***'wdw_size.i'***resize='resize'***'
SAY 'temp = 'temp
RAISE user 1 DESCRIPTION (temp)
END
END
IF sw_resize = 1 THEN
rc = call_guisetctlplacement(next_ctrl, handle, x_pos, y_pos, x_size, y_size)
END
RETURN 0
move_the_field:
ARG ctrl_type
SAY 'In move_the_field'
tempx = x_pos; tempy = y_pos
RETURN 0 |