Tank Visualization

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
bastian_c
Posts: 5
Joined: Sat Oct 01, 2011 2:23 pm

Tank Visualization

Post 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

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Tank Visualization

Post 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;
		}
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply