Positioning this controls can be done using the Style property. In fact you can set your css style properties for the control.
This example shows how to create an image control in runtime and position it absolute at a given position.
MyImage := Image.Create;
MyImage.ImageUrl := 'images/test.gif'; MyImage.ID := 'myimage'; MyImage.Style['Position'] := 'Absolute'; MyImage.Style['Top'] := '400px'; MyImage.Style['Left'] := '100px'; Panel1.Controls.Add(MyImage); |
No comments:
Post a Comment