Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic wrong size of program generated boxes (Read 2098 times)
Julian Moschüring
Guest


wrong size of program generated boxes
Jun 20th, 2006 at 7:27am
Print Post  
Hello everyone,
i am generateing a container with a few boxes by code for use as a legend. Works fine on all pcs i tested it on but a few of our customers complain about the container beeing to big.

Looks like this at my side:


and like this at our customers side:


First i create the container and set the following properties
Code
Select All
cn.MoveTo 1, -45
cn.SetSize 1, 1
cn.Style = bsContainer
cn.LayoutGap = 5
cn.LayoutStyle = lsHorizontalCentered 



then i add the boxes to the container:
Code
Select All
b.Locked = True
b.PutInContainer cn
b.SetSize 120, b.bottom - b.Top 



The container is positioned at -45 so it will not collide with any program generated, auto positioned boxes.
I'm using Gdi+ to draw. The customer has Windows XP installed.
Any clues?
thanks, kindly, Julian Moschüring, SIP GmbH
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: wrong size of program generated boxes
Reply #1 - Jun 20th, 2006 at 8:16am
Print Post  
Hi,

It seems that code depend on the initial size of a box:

b.SetSize 120, b.bottom - b.Top

Try setting the height to a fixed value too. It might also help to add the box to the container after setting its size, not before that.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint