Drawing lines

  • Thread starter Thread starter STom
  • Start date Start date
S

STom

I have an application that has several labels with borders. I need to draw
lines on the screen sort of like an organizational chart.

Are there any samples that anyone knows about that represents a good way to
draw the lines. I've tinkered with it some but my attempts seem to suck the
life right out of the screen performance.

Thanks.

STom
 
* "STom said:
I have an application that has several labels with borders. I need to draw
lines on the screen sort of like an organizational chart.

Are there any samples that anyone knows about that represents a good way to
draw the lines. I've tinkered with it some but my attempts seem to suck the
life right out of the screen performance.

A good solution depends on how the lines should be drawn (connection
lines, grid lines, arrows, ...). Please be more specific!
 
Correct!

If you look at an organization chart you will see that the lines would need
to connect to the edges of the label borders and then intersect with other
perpendicular lines.

So, for a line going from left to right, I will start in the middle (Y
position) of the label and at the far right hand side of the label and
extending it to perpendicular line.

I appears the only way to draw any line is to have a method that is called
within the forms Paint method so that the paint event arg can be passed into
my function. But, can lines be drawn on panels also just like on a windows
form.

Anyway, it just seems like putting a function to be called inside of a paint
event is going to get called too many times, thus causing slow reactions in
the form.

STom
 
I also need to draw lines with different options like borders, box, double
line etc.

Thanx.
STom said:
Correct!

If you look at an organization chart you will see that the lines would need
to connect to the edges of the label borders and then intersect with other
perpendicular lines.

So, for a line going from left to right, I will start in the middle (Y
position) of the label and at the far right hand side of the label and
extending it to perpendicular line.

I appears the only way to draw any line is to have a method that is called
within the forms Paint method so that the paint event arg can be passed into
my function. But, can lines be drawn on panels also just like on a windows
form.

Anyway, it just seems like putting a function to be called inside of a paint
event is going to get called too many times, thus causing slow reactions in
the form.

STom
way
suck
 
Post on microsoft.public.dotnet.framework.drawing. There several people on
that forum that can help you.
Also check out Bob Powell's GDI+ FAQ www.bobpowell.net
This covers a lot of basics with Drawing.
As well as covers some basics on performance.

-
Paul
 
Back
Top