![featuredImage2 → Python GUI featuredimage2 2](https://i0.wp.com/pythongui.org/wp-content/uploads/2021/02/featuredImage2-9987528.png?resize=1140%2C675&ssl=1)
.Width specifies the horizontal size of the control or form in pixels.
Use the Width property to read or change the width of the control.
Note: For tab sheet controls, changing this property at the run time does not affect.
Here are the examples of drawing a rectangle with Width =100, 200, 300, or 460 respectively:
1 2 3 4 |
# Draw a rectangle shpRectangle = Shape(pgOne) shpRectangle.SetProps(Parent=pgOne,Shape = 'stRectangle') shpRectangle.SetBounds(5,5,100,300) |
The results:
![11Width1004233495 → Python GUI 1 1width 100 4233495](https://i0.wp.com/pythongui.org/wp-content/uploads/2021/02/1_1Width_100-4233495.png?resize=489%2C445&ssl=1)
![12Width2001302766 → Python GUI 1 2width 200 1302766](https://i0.wp.com/pythongui.org/wp-content/uploads/2021/02/1_2Width_200-1302766.png?resize=490%2C447&ssl=1)
![13Width3005672376 → Python GUI 1 3width 300 5672376](https://i0.wp.com/pythongui.org/wp-content/uploads/2021/02/1_3Width_300-5672376.png?resize=487%2C444&ssl=1)
![14Width4607319464 → Python GUI 1 4width 460 7319464](https://i0.wp.com/pythongui.org/wp-content/uploads/2021/02/1_4Width_460-7319464.png?resize=489%2C445&ssl=1)
Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.