Coding question, canvas



I want to use the canvas for an application I'm playing around with. I
want to be able to place simple figures on a "sheet", and to move them
around. This is very easy and I've done that.

I will later need to add the ability for the items to be connected to
each other with straight lines, forming a sort of graph. Moving an
object will then cause the lines connecting the objects to
behave like rubberbands.

I don't feel like coding this now and later discover that I have
to rewrite everything, so I'd rather get it right from the start :)

Would this be solved better by creating my own canvas item or by
grouping lines and rectangles and other native canvas items?

When do you genereally need to create your own items?

One more question... maybe a silly one. How do I get just a single
point on the canvas? I can make lines, arrows, rectangles, arrows, etc,
but not a small point. I tried to draw a line from one point to the
same but it's "too short" too be seen...

Thanks
Richard




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]