关于PB中,宽高一样,但不是正方形的问题请教
powerbuilder 窗口或数据窗口中的对象width height 相同,但看起来并不是正方形,怎么回事?如何处理?
[解决办法]
你可以反过来,以高度来决定宽度
long ll_height
ll_height= unitstopixels(height, yunitstopixels!)
width= pixelstounits(ll_height, xpixelstounits!)
或者确定高度与宽度都为一个常量,如300像素
width = pixelstounits(300, xpixelstounits!)
height = pixelstounits(300, ypixelstounits!)