A long standing complaint with the standard progress bar control is that there is no easy way to display text. In spite of numerous requests, Microsoft has not included this capability. The following code includes a class, `CustomProgress` which inherits the standard `ProgressBar` and adds such a feature. It is fairly easy to use. If you want to show a percentage progress you set `Text` to a null string and the percentage will be calculated from the `Minimum` and `Maximum` value properties. If you want a custom string then assign it to `Text`. Either the percentge or custom text will …

Member Avatar
Member Avatar
+4 forum 3

Pretty neat text-based RPG that I made. Currently my first game.

Member Avatar
Member Avatar
+0 forum 18

The Tkinter GUI toolkit comes with a scrolled text widget that is called ScrolledText. To get access to it you have to import it separately. It allows you to display large amounts of text in a small space.

Member Avatar
Member Avatar
+0 forum 2

If you have a long message to display in a large readable font, then this little Tkinter GUI toolkit code might help.

Member Avatar
Member Avatar
+1 forum 10

For a small class it doesn’t matter that much, but for a bigger class I find it handy to have an oversight of all the methods at hand. That’s what I did here. One requirement is that the class file has already been compiled error free. Don’t know if my algo to detect a “method” line is bullet proof, but it works in most if not all cases tested. Tips on how this could be improved are always welcome. Further highlights: How to: Show text in a listbox. How to: Save text in a file How to: Open and read …

Member Avatar
Member Avatar
+0 forum 5

Just the very basics on how to draw a rotated text using the Python GUI toolkit PySide (public PyQt). Please experiment and embellish.

Member Avatar
Member Avatar
+2 forum 2

I accidentally posted a lower version of the game that had more flaws, and a few less features. This one has a few more minor bugs fixed, and a power attack instead of a normal attack.

Member Avatar
Member Avatar
+0 forum 14

This simple code shows how to write text with a given font, font size and color using the module pygame ...

Member Avatar
Member Avatar
+4 forum 8

Here is simple text file example for beginners, using try..except for reading old content as it may not yet exist.

Member Avatar
Member Avatar
+1 forum 6

Demonstrates the Right Hand Rule maze solving algorithm, with some sweet console colors and text display and erasing, in Windows. Note that if the Start is moved away from all the walls in the maze, the right hand rule fails, circling endlessly. Also, a similar failure happens if the Start is put onto an "island" part of the walls in the maze. This algorithm will not solve all mazes.

Member Avatar
+0 forum 0

In today's environment where just about anyone can snoop around your e-mail, it is prudent to securely encrypt your more private writings. This little Python program will make it easier to do so.

Member Avatar
Member Avatar
+4 forum 1

A somewhat newer look at Peter Parente's pywin32 based speech engine. It will read text on your computer.

Member Avatar
Member Avatar
+3 forum 1

A little find and replace function for PHP, not tested, but theoretically should work.

Member Avatar
Member Avatar
-1 forum 5
Code Snippet ComboBox Woes

Upon resizing an anchored combobox - I noticed the text was always selected. This sparked the initiative to fix this problem. (Microsoft decided not to) So by extending the combobox class we can fix this. The following class can be dropped into a form for designer manipulation or as a user control. This is an extremely simple fix.

Member Avatar
+2 forum 0

This shows the code for one simple crypt of text by swapping two adjoining characters each. You can make that more complex if you like. Can also be used for one nice riddle.

Member Avatar
Member Avatar
+2 forum 1

Hi All, In my opinion, this is the best way to read in text from a csv file. Take for example if you are importing addresses: "1 Main Street","SmallTown","SmallCounty" The above is fine and easy to parse in BUT what if an address like this was entered: "App 1A, Tall Towers","SmallTown","SmallCounty" By setting the parser setting delimiter to the comma AND also marking that the fields are enclosed in quotes, the parser knows the comma in the middle of the quotes is not a delimiter and therefore brings the text in as one field.

Member Avatar
Member Avatar
+1 forum 2

I wrote this program because I often am asked by people that know that I like to make games to make just a quick simple game for some reason or another. I always make a simple text based adventure game (like Zork, but simpler) and they are usually happy with it. Well, about 7 hours ago I was asked to make a game for somebody's birthday tomorrow, so naturally I started making yet another text based adventure game. Suddenly I realized that I basically had the code to make one of these games memorized... so I decided that enough is …

Member Avatar
+0 forum 0

Two litle functions to help on text slice and spliting. The code comments say it all. [CODE]# Slicer takes as arguments a tuple containing the string before, # the string after and the string to truncate. It returns the string # between the two given strings Slicer = lambda((b, a, t)): t.partition(b)[2].partition(a)[0][/CODE] [CODE]# Spliter takes as arguments a tuple containing the string before, # the string after and the string to truncate. It returns a tuple # containing the string before, the string between and the string # after the given strings Spliter = lambda((b, a, t)): ((t.partition(b)[0]),) + t.partition(b)[2].partition(a)[0::2][/CODE] …

Member Avatar
Member Avatar
+1 forum 2

Aproach to the implementation of K-Nearest Neighbor (KNN) using the Euclidean algorithm. Sample Usage: [CODE]mywork = Words_Works() lit = 'literature.txt' mywork.add_category(lit, 'Literature') # adding files as category comp = 'computers.txt' mywork.add_category(comp, 'Computers') phy = 'physics.txt' mywork.add_category(phy, 'Physics') # saving categories dictionary to file mywork.save_categories() # can be loaded calling load_categories() print mywork.categories # prints categories dictionary print txts = ('sample1.txt', 'sample2.txt') # creating list of files to add for text in txts: mywork.add_text(text) # adding files print mywork.all_texts # prints files word ocurrence count print mywork.knn_calc() # perform calculation print mywork.knn_results # print overall results print mywork.knn() # print files …

Member Avatar
Member Avatar
+0 forum 8

I made a PHP class that dramatically simplifies sending text messages with PHP. I know this isn't really a "help me out!" type question per se, but I would like to share the code because I have found it to be tremendously useful. You're free to do whatever you'd like with the code . You can even go around telling people you made it. Just don't accuse me if anything goes wrong. Example Usage: [CODE]Cell::send('5551234567', VERIZON, 'Hi man, this message will be automatically paginated to be sent via text messages. How cool is that? Plus, you'll get page numbers in …

Member Avatar
Member Avatar
+0 forum 9

This is a very simple WYSIWYG Text editor that only has three options Bold, Italic, and Underline. just copy and paste on the page you want it on. it is really easy to add more features. ENJOY

Member Avatar
Member Avatar
+0 forum 4

The code from my answer to thread: [url]http://www.daniweb.com/forums/thread292949.html[/url] Any field names with any same separator separating the values. This is straight text file reading routine, see the original thread for csv module based code. sample.dat: [CODE]id; name; email; homeaddress 123; gishi; gishi@mymail.com; 456 happy st. 345; tony; tony.veijalainen@somewhere.com; Espoo Finland [/CODE]

Member Avatar
Member Avatar
+0 forum 1

I used this pattern few times to answer a thread and thought to post it as snippet.

Member Avatar
Member Avatar
+1 forum 1

The End.