Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Wrong Size problem..
Wrong Size problem.. [message #7494] |
Mon, 01 January 2007 22:15  |
yoco
Messages: 25 Registered: June 2006 Location: Taiwan
|
Promising Member |
|
|
I found there is a problem about the size of controls.
I layout a control with size 360x360 (in pixel),
but I found that, the "real size" is about 400x400,
which is bigger than I expected.
Therefor I put another control with size 20x20,
and I counted the size of this control pixel by pixel,
the result is 22x22!
The actrul size of all controls (and windows) are about 11% bigger than I designed.
And I can't figure out how to fix this problem @@"
What can I do now?
Thank you ^_^
---
Environment:
OS:XP SP1
Compiler:VC++7
UppVer:612 dev3
(I'm not sure does previous version has this problem too.)
|
|
|
|
Re: Wrong Size problem.. [message #7500 is a reply to message #7498] |
Tue, 02 January 2007 07:05   |
yoco
Messages: 25 Registered: June 2006 Location: Taiwan
|
Promising Member |
|
|
luzr wrote on Mon, 01 January 2007 18:18 | Well, dialogs are zoomed because the size of font is different (Everything is defined relative to choosen base font, then scaled up for actual font).
The right thing to do is to design your widgets so that they do not care.
Mirek
|
Yes, I know the real size is determined by the system default font.
I havd read it in document "Logical positions."
Quote: |
Zoom factor is determined by ratio of text "OK Cancel Exit Retry" in runtime standard font size to Size(99, 13) - size of this text using standard font.
|
However, in the layout tool of TheIDE,
the size of controls are assigned in
LeftPosZ(16, 108).TopPosZ(20, 36)
There are "Z" postfix in there functions,
which means the size of there controls are "Zoomed".
Is it possible that, the wrong size is caused by the numerical error of the integer divide operation?
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 21:54:07 CEST 2025
Total time taken to generate the page: 0.01085 seconds
|