Page 1 of 1

Tank Visualization

Posted: Wed Aug 29, 2012 12:19 pm
by bastian_c
Hello,

I was just wondering if there is a workaround for resizing rectangles for tank measurements.

The problem that I have is that I only can resize a rectangle from its upper left corner, but if I want to use this I want to fill the tank (rectangular) from the bottom up not from top to down.

http://ixtalk.beijerelectronics.us/view ... ?f=4&t=259

I have read this topic but the linear meter is not an option and using a lot of images is also not the best choice with approx. 30 tanks :(

Is there a way to resize the rectangle based on the lower left corner?

If it depends on the iX developer version, I am using 1.3.
Will it work in 2.0?

greetings

bastian

Re: Tank Visualization

Posted: Wed Aug 29, 2012 12:43 pm
by mark.monroe
You can change the height of a rectangle and the position at the same time. The below can be put in the button click event in a script. It will make the rectangle look like it is growing from the top. You can do the same thing with the left and width properties. That way you can control which side of the rectangle grows.

Code: Select all

		void Button3_Click(System.Object sender, System.EventArgs e)
		{
			//By both lengthing the rectangle and moving it,
			//it looks like the rectangle is growing from the top.
			//Move the Rectangle position on the screen
			this.Rectangle1.Top -= 10;
			//Make the Rectangle taller
			this.Rectangle1.Height += 10;
		}