pbLegacyDialogRatio - cApplication

Sets an application's sizing to use the older, DPI unfriendly dialog to GUI conversion logic

Type: Property

Access: Read/Write

Data Type: Boolean

Parameters: None

 Property Boolean pbLegacyDialogRatio

Read Access: Get pbLegacyDialogRatio to BooleanVariable
Write Access: Set pbLegacyDialogRatio to BooleanVariable/Value


Versions of DataFlex 19.1 and above use a more accurate mechanism for converting dialog units to GUI (pixel) units. The older mechanism used a less precise rounding calculation that resulted in inconsistent sizes and locations when DPI was changed. Views and Dialogs designed at 100% DPI did not scale well at other DPIs like 125% and 150%. This would result in either screens that were too big or too small. When too small, character truncation might occur - usually in a label.

It was for this reason that we have long recommended that you test your application at different DPIs and that you will get the best results if you left some extra space in your views and dialogs.

We now use a more accurate method of converting dialog units to GUI units, which results in your views and dialogs looking consistent across differing DPIs. This makes developing and deploying for different DPIs much easier. This is important, given that most new displays were designed to be used at higher DPIs.

If you have created screens at 100% DPI, they may appear a little smaller, which may result in character truncation. (This happens because the 100% DPI rounding error tended to round up making things bigger). This will only occur if you didn't leave that suggested "extra room" in your views. If this is the case, you will want to adjust your screens to make things fit. The reward for this is that your application will look consistent and therefore much better at higher DPIs.

If you find yourself in a transition period where you cannot yet change your views, you can set pbLegacyDialogRatio to True in your cApplication object. This will make your views and dialogs appear as they did. This should only be considered a transition strategy and is discouraged. A DPI of 100% is no longer the expected default.