This is another grid repainting problem.
In a maximized MDI application the grid selection is not correctly redrawn after closing a popup window.
Please find enclosed a function that illustrates the problem:
It creates an MDIForm with two menus and the popup form.
Click on the first menu (Here’s the bug). The popup window will appear. Close it and the selection in the first column will not be redrawn. This applies only when the MDI application is maximized
Click on the second menu (This is OK): It will open a standard popup window (the printer dialog). After closing the printer dialog the grid selection will be redraw correctly
Error_grid_selection;fm;mdi;shape;t;ŒWSELF
ŒWSELF „ mdi „ 'MDI'ŒWI'Create' 'MDIForm'('visible'¯3)
t „ ŒWI'.pr.New' 'Printer'
ŒWSELF „ fm „ ŒWI'.fm1.New' 'Form'('visible'3)
ŒWI'onResize' "ŒWI'.grid.where'(0 0,ŒWI'extent')"
t „ ŒWI'menu1.Create' 'Menu'('onClick' "0 0½'fmPopup'ŒWI'Wait'")('caption' 'Here''s the bug')
t „ ŒWI'menu2.Create' 'Menu'('onClick' "0 0½'MDI.pr'ŒWI'PrintDlg'(1 32)")('caption' 'This is OK')
ŒWSELF „ ŒWI'.grid.Create' 'ActiveControl APL2000.Grid'
shape „ 50 30
ŒWI'Set'('xRows'(1œshape))('xCols'(2œshape))('xPages'3)
ŒWI'xNumber'(1‡¼1œshape)(1‡¼2œshape)(?shape½10000)
ŒWI'xSelection'(12 1 1,2œshape)
fm ŒWI'Resize'
t „ 'fmPopup'ŒWI'Create' 'Form' 'Hide'('border'2 16 256)
0 0½mdi ŒWI'Wait'
Attached file: Error_grid_selection.JPG