Drawing Elipses

J

John Budding

I would like to draw an Elipse enclosing a text box and the associated label
on a line in an Access 2003 report.
The output to the text box may vary in length, so the elipse would need to
vary horizontally too, if possible.
How do I define the colour and thickness of the line forming the elipse ?
 
M

Marshall Barton

John said:
I would like to draw an Elipse enclosing a text box and the associated label
on a line in an Access 2003 report.
The output to the text box may vary in length, so the elipse would need to
vary horizontally too, if possible.
How do I define the colour and thickness of the line forming the elipse ?


Use the Circle method in the section's Print event. This
will make the elipsis approximately the same size as the
text box:

With Me.textbox
Me.Circle (.Left+.Width/2, .Top+.Height/2), _
(.Width+200)/2, RGB(255, 0, 255), , , .Height/.Width
End Width

I suggest that you just center the text in the text box and
forget about using a different radius for the elipsis.

If using a different radius is important or if the text box
can grow, then use the TextWidthHeight solution at
www.lebans.com to get the width and height of the text.
 
J

John Budding

Thank You, Marshall

elipse now drawn round an enclosing rectangle to secure the effect I hoped
for . . .
is it possible to increase the thickness of the line forming the elipse ?
 
M

Marshall Barton

John said:
elipse now drawn round an enclosing rectangle to secure the effect I hoped
for . . .
is it possible to increase the thickness of the line forming the elipse ?


Use the report's DrawWidth property:

Me.DrawWidth = 3
 

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

Top