It is possible to have APL characters appear in the APL Grid but there are several things you need to be aware of:
1. The grid only supports ANSI fonts. So the xFontName property for the grid must be set to an ANSI APL font like APLHELP. The other APL fonts won't work because they're symbol fonts.
2. The AV2ANSI and ANSI2AV functions from the Windows.w3 workspace are necessary to set and retrieve APL text in the grid. These functions will convert APL text from ŒAV order to ANSI order and vice versa. These functions utilize the av2ansi and ansi2av variables in the same Windows.w3 workspace. So remember to include them in your workspace.
3. Not all APL characters will appear correctly in the grid. One such example is domino.
Example:
)copy c:\aplwin52\tools\windows ansi2av ANSI2AV
'form' Œwi 'Form'
'form.grid' Œwi 'Create' 'APL.Grid'
'form.grid' Œwi 'rows' 3
'form.grid' Œwi 'cols' 3
'form.grid' Œwi 'xFontName' 1 1 'APLHELP'
data„(AV2ANSI 'Œ¼½Ð®')
'form.grid' Œwi 'xText' 1 1 data ª Œwi 'Paint'
APL text should appear in cell (1 1).
Next, retrieve the APL text in cell (1 1).
ANSI2AV (œ'form.grid' Œwi 'xText' 1 1)
Œ¼½Ð®
The result should be the APL text.
Now, if you want to be able to type APL characters in the cell, you'll need to create the special edit window using the xEditWindow property and configure the (special) edit window to accept and display APL characters (style=2048 and font=APLHELP). Remember to do the AV2ANSI translation when passing the data from the special edit window to the grid and the ANSI2AV translation when doing the reverse.
APL2000 Support