Objective Grid: WYSIWYG mode

Article ID: 91
Last updated: 22 Jun, 2018
Article ID: 91
Last updated: 22 Jun, 2018
Revision: 3
Views: 1956
Posted: 12 Jan, 2001
by Meltreger B.
Updated: 22 Jun, 2018
by Meltreger B.

Problem


WYSIWYG mode
 


Cause



Action


We recommend not to use the WYSIWYG mode (CGXGridParam::SetDrawWYSIWYG (TRUE)), especially when you are developing for Win95.

Following problems are known with WYSIWYG mode:

  • CGXDateTimeCtrl asserts when the user starts editing the cell while using WYSIWYG mode
  • In WYSIWYG mode, the text is broken at exactly the same position as when printed, but the fonts on the display are not exactly proportional to the printed fonts and therefore text will sometimes draw over the cell. This is by design and can't be changed.
  • Under Win95, when changing column widths or row heights the display does get messed up. You have to minimize and restore the grid view so that the display is correct again.

Use WYSIWYG mode only temporarily. That means if you require that text is broken correctly when you print the grid, temporarily enable WYSIWYG mode, resize the rows or columns, and then reset the WYSIWYG mode.

Example:
 

GetParam()->SetDrawWYSIWYG(TRUE);
FreeObjectCache();
UpdateFontMetrics();
ResizeRowHeightsToFit(range);
GetParam()->SetDrawWYSIWYG(FALSE);

This article was:   Helpful | Not helpful
Report an issue
Article ID: 91
Last updated: 22 Jun, 2018
Revision: 3
Views: 1956
Posted: 12 Jan, 2001 by Meltreger B.
Updated: 22 Jun, 2018 by Meltreger B.

Others in this category