Member Avatar

[CODE]from Tkinter import * root = Tk() tipwindow = None # Creates a tooptip box for a widget. def createToolTip( widget, text ): def enter( event ): global tipwindow x = y = 0 if tipwindow or not text: return x, y, cx, cy = widget.bbox( "insert" ) x += widget.winfo_rootx() + 27 y += widget.winfo_rooty() + 27 # Creates a toplevel window tipwindow = tw = Toplevel( widget ) # Leaves only the label and removes the app window tw.wm_overrideredirect( 1 ) tw.wm_geometry( "+%d+%d" % ( x, y ) ) label = Label( tw, text = text, justify = …

Member Avatar
1
11
Member Avatar

This is my first GUI program in Java. If finds the day of the week for any given date which is after 1 January 1900.

Member Avatar
1
5
Member Avatar

Simple functions for binary-to-decimal and decimal-to-binary conversion :)

Member Avatar
0
11
Member Avatar

A simple function to return the number of occurances of a letter in a text. An easier way to implement this would be by using a dictionary :) P.S sorry if there already is a code snipped like that somewhere.

Member Avatar
1
4
Member Avatar

this is my version of the popular snake game. The snake is controlled by the mouse so be careful when you start :) it grows infinitely long...you should download the apple.jpg file for the game, or graw one of your own just name it apple.jpg and place it in the same directory as the code itself :) have fun. If there are any problems please post a comment :) CONTROLS>> left MB increase speed; right MB decrease speed; middle MB pouse game and resume aswell

0
2

The End.