Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8082

Re: PowerBuilder adjusting widths and x-position after rendering

$
0
0

Hi, Lucas.

 

PB automatically adjusts X, Y, width & height values that are in PowerBuilder Units (PBU's) to the nearest pixel-equivalent value...If the X-position of 300 PBU's you code translates internally to a fraction of a pixel, PB adjusts the PBU value. In your example, 300 becomes 302.

 

This can be illustrated in the DataWindow, Window or User Object Painters by moving a selected object via the Up/Down/Left/Right arrow keys one pixel at a time and observing the X, Y, W & H values displayed in the lower right corner of the Painter window. Set the X, Y, W or H property in the Position tab in a Painter's Properties pane, save, exit the Painter and re-open it, and you'll see the same behavior as what you're experiencing.

 

I suggest you instead manage the X & Y coordinates, widths & heights of your objects/controls in pixels, but convert each value from pixels to PBU's via the PixelsToUnits PowerScript function prior to creating the syntax.


Viewing all articles
Browse latest Browse all 8082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>