[Tutor] Creating custom GUI elements

Che M pine508 at hotmail.com
Sun Sep 5 04:35:13 CEST 2010




> How would I go about creating custom GUI elements? For example, 
> if I wanted to make a simple LEGO maker app, how would I write the 
> code for the bricks so that the user could drag them around and then 
> build LEGO models?

For 2D legos, using the wxPython widget toolkit, you could probably use 
its widget called FloatCanvas to provide a space in which bitmaps can be 
moved around a screen and their coordinates tracked.  Then you would 
have to write the code that determines if the bitmap of the brick is in the 
right position to snap into place with another brick.

Che
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100904/255d5275/attachment.html>


More information about the Tutor mailing list