Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing a real DPI-aware VFP application
Message
From
06/02/2021 11:10:58
Walter Meester
HoogkarspelNetherlands
 
 
To
06/02/2021 10:29:01
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01678100
Message ID:
01678123
Views:
63
>>Correct,
>>
>>In a huge existing application implementing DPI awareness is no joke. Its possible, but indeed you'll have to take care of a lot of things.
>>However some things go reasonbly automatic. Increasing or decreasing fontsize on a grid will cascade down to the column, header and control level automatically.
>>
>>Walter,
>
>But not column width, if spaced fine, and I'm not sure about rowheight. Inserted stuff in containers?

Column width and rowheight, headerheight and so on WILL GO automatic when changing fontsize.

Lot's of things to consider.
>Also Fontsize might better be scaled in Integers, so width / height of the container must scale according to space needed (depending on the number of objects per direction) If objects are intersecting, for example in different columns, it changes. Correct height of an editbox is tricky w/o DPI, because if the gaps it needs, this is all odd.

>Again, one would need to parse the stuff in a orientation given (what must not be left to right, it could be left to right, dynamic, right to left, the very same container)

>So how to figure out what goes on? It could operate on RESIZE, MOVED, SPLITTER movement, ANCHOR ....

If you're using the anchor property, all goes pretty automatic and will allign accordingly. In case of splitters, they would move accordingly as well. In self written resize code you'll have to use the ZOOMLEVEL property to calculate distances, sizes etc. Its straightforward but can be a lot of work to get it exactly right to the pixel.

>It could be limited by MIN* and MAX* values, possibly something user dynamic.

Sure, but that can be solved easily in the validation of the splitter object which will be triggered by the moved event.

>There is a lot math involved on how to resize a button if you change it's fontsize. Again, it does not scale very well between fontsize and width / height

In general that is not really the case or not at least a problem for us. In general if you scale up 25% of the buttonsize, scaling up the fontsize 25% is pretty accurate.
We handle multiple languages where the text within containers could be different between languages, so this is something we already have to take care of regardless.

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform