User Control Renders on Separate Line

J

jdp

I've created a user control that I then place in a panel. The reason
it's in a panel is that it's part of search criteria that I hide/show
panels based on the type of search begin done. I can place a label
next to this control in the IDE and it looks fine but when I run the
app, the label is on the line above the control. I've tried placing
the label INSIDE the control, placing the user control inside a <div>
and allowing objects on either side and the same effect occurred.

Any help would be greatly appreciated.

Thanks.
 
S

Steve C. Orr [MVP, MCSD]

If you want them to appear next to each other, the easiest solution is to
build a two celled table.
Put the label in the left cell and the control in the right hand cell.
 
J

jdp

Thanks for the reply.

I'm writing this site that has to be accessible to people with
disabilities. I'm under the impression that tables should only be used
to render data. Would the solution you're suggesting no longer be
valid or would the special screen readers interpret this correctly?

Thanks again.
 
S

Steve C. Orr [MVP, MCSD]

In that case tables might not be such a great solution.
Would absolute positioning help?

Here's more info:
http://SteveOrr.net/articles/ControlPositioning.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



jdp said:
Thanks for the reply.

I'm writing this site that has to be accessible to people with
disabilities. I'm under the impression that tables should only be used
to render data. Would the solution you're suggesting no longer be
valid or would the special screen readers interpret this correctly?

Thanks again.
 
J

jdp

Thanks, I'll give it a read.

I don't know if you saw my other question in the other groups or not
but I'm trying to build a user control where, at design time, a
developer modifying a property will see those changes immediately
rather than at run time. For example, the control has a label in it
and the control exposes a LabelText property. If I set this property
at design time, I don't see the change until run time.

Any thoughts you might have or are able to point me in the right
direction would be greatly appreciated.

Thanks again.
 
J

jdp

I found my problem: the user control had a <div> element defined. Once
I removed that, everything works great!

Thanks for you help!
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top