Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Positioning dynamically created controls (http://www.velocityreviews.com/forums/t775070-positioning-dynamically-created-controls.html)

Guy 12-22-2004 04:33 PM

Positioning dynamically created controls
 
Hi,

I have a page that adds controls dynamically to the page. How do I control
where these controls appear, relative to the other controls? I'd like all new
controls to be listed vertically between two existing controls.

Thanks,
Guy

Victor Garcia Aprea [MVP] 12-23-2004 01:34 AM

Re: Positioning dynamically created controls
 
Hi Guy,

When it comes to positing you have mainly two choices: table layout or CSS.
I think you're looking for CSS positioning. Do some googling, there are tons
of info on how to set an elmement position by using CSS.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
My blog: http://clariusconsulting.net/vga
My profile: http://aspnet2.com/mvp.ashx?vga


"Guy" <Guy@discussions.microsoft.com> wrote in message
news:1D18BCB0-A78E-458E-A99F-F4D6C9B966AA@microsoft.com...
> Hi,
>
> I have a page that adds controls dynamically to the page. How do I control
> where these controls appear, relative to the other controls? I'd like all
> new
> controls to be listed vertically between two existing controls.
>
> Thanks,
> Guy




Mohamed El Ashmawy 12-23-2004 10:53 AM

Re: Positioning dynamically created controls
 
As Victor said, you could use CSS postioning for that.
For example, if you have a button control that you add dynamically, then
you can do the following:

Dim x As New Button
x.Style.Add("LEFT", "192px")
x.Style.Add("TOP", "224px")
x.Style.Add("POSITION", "absolute")

where left and top would be the position x and y on the page.

Regards
Mohamed El Ashmawy
MEA Developer Support Center
ITWorx on behalf of Microsoft EMEA GTSC



All times are GMT. The time now is 08:49 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.