Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to draw and drag black dot and draw lines between dots in a canvas

Status
Not open for further replies.

tcltkmail

Programmer
Feb 14, 2002
3
DE
hi, dear tcl/tk users,
I am a beginner for tcl/tk.

I want to create a small painter using canvas. The painter is like this: when I click on the canvas, it should draw a black dot at the current cursor position. After this when drawing next black dot, the every black dot should be connected using lines in the order of X coordinate. The every dot should be able to be dragged and the lines connected with it should be continuely changed with dragging. When clicking on the line between two black dots, another black dot should be able to be added and then connect with its neighbour dots using lines.
Does anyone know how to complete this canvas painter? Any suggestions are highly appreciated. Especially hope you provide some sample tcl code.

Thank you in advance.
Joye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top