Shape in DelphiVCL.Shape is used to specify the shape of the control.
Set Shape to the geometric shape that should be drawn on the form.
The Shape property has these possible values:
Value | Meaning |
stCircle | The shape is a circle. |
stEllipse | The shape is an ellipse. |
stRectangle | The shape is a rectangle. (Default) |
stRoundRect | The shape is a rectangle with rounded corners. |
stRoundSquare | The shape is a square with rounded corners. |
stSquare | The shape is a square. |
Here are the working examples of them:
- Circle:
1 2 3 4 |
# Draw a circle shpRectangle = Shape(pgOne) shpRectangle.SetProps(Parent=pgOne,Shape = 'stCircle') shpRectangle.SetBounds(85,45,300,300) |
- Ellipse:
1 2 3 4 |
# Draw an ellipse shpRectangle = Shape(pgOne) shpRectangle.SetProps(Parent=pgOne,Shape = 'stEllipse') shpRectangle.SetBounds(35,45,410,300) |
- Rectangle:
1 2 3 4 |
# Draw an rectangle shpRectangle = Shape(pgOne) shpRectangle.SetProps(Parent=pgOne,Shape = 'stRectangle') shpRectangle.SetBounds(35,45,410,300) |
- RoundRect:
1 2 3 4 |
# Draw an rectangle with rounded corners shpRectangle = Shape(pgOne) shpRectangle.SetProps(Parent=pgOne,Shape = 'stRoundRect') shpRectangle.SetBounds(85,45,300,300) |
- RoundSquare:
1 2 3 4 |
# Draw an square with rounded corners shpRectangle = Shape(pgOne) shpRectangle.SetProps(Parent=pgOne,Shape = 'stRoundSquare') shpRectangle.SetBounds(85,45,300,300) |
- Square:
1 2 3 4 |
# Draw an square shpRectangle = Shape(pgOne) shpRectangle.SetProps(Parent=pgOne,Shape = 'stSquare') shpRectangle.SetBounds(85,45,300,300) |
Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.