Design time postion of custom control??

H

Harry Simpson

Simple question for you veterans...

My test page has two controls and they are laid out in VS2003 designer as
follows:

<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<cc2:Multiplier id="Multiplier1" style="Z-INDEX: 101; LEFT: 96px;
POSITION: absolute; TOP: 260px"
runat="server" Width="266px" Height="30px"></cc2:Multiplier>

*******************************************
my custom control below
*******************************************

<cc1:WaitControl id="WaitControl2" style="Z-INDEX: 102; LEFT: 54px;
POSITION: absolute; TOP: 118px"
runat="server"></cc1:WaitControl>
</form>

BUT - during runtime the controls are side by side as if the page is set to
"FlowLayout" or at least as if the TOP attribute were the same for both
controls.

For a custom control, isn't the placement of that control saved and used
during runtime?

If not, how can I set the placement of the custom control, in this case an
image control?

Thanks
Harry
 
D

Dawn Baker

You should be able to step through your code and see what the properties
of your controls are doing, if they're getting changed during rendering.

I have had inconsistent behavior in the style attributes entered on the
html page for web controls - visual studio just deletes it for me (so
kind of them).

You can also set the style properties at runtime with
ControlName.Style.Add("LEFT", "8px");
ControlName.Style.Add("TOP", "75px");

Hope that helps,
Dawn.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top