Home arrow PHP arrow Building Your Own Desktop Notepad Application Using PHP-GTK

Building Your Own Desktop Notepad Application Using PHP-GTK

If you think building a desktop application such as Notepad is difficult, think again. If you use PHP-GTK, it's almost ridiculously easy. This article will show you how. By the time you're done, you'll have a full cross-platform application in about 100 lines.

  1. Building Your Own Desktop Notepad Application Using PHP-GTK
  2. Assumptions
  3. Calling each respective function
  4. Edit Operations
  5. About the modified flag
By: K.K.Sou
Rating: starstarstarstarstar / 9
September 23, 2008

print this article



You have successfully installed PHP-GTK v2.0.1.

You have also followed the hello world example and hello Glade! tutorial on the official php-gtk website.

So, what's next? You might be wondering. Where do you go from here?

A real-life application with complete sample code

This article will show you how easy it is to build a desktop Notepad application similar to the default Notepad application in a Windows system.

I will explain to you all the core components, and how each component ties in with the others.

You will see how signal handling is being used in real life, how menu items are processed, how to change the font of the editor, and how to open and save the text document.

At the end of the article, you will also be presented with the complete sample code. You will be surprised that the entire code is just 100+ lines - a desktop notepad application written using the PHP with which you're so familiar!

I'm using the Windows Notepad application as the example for this article because this is one application with which most people are familiar. Of course the sample code in this article can be run on Windows, Linux or MacOS. Just like PHP, PHP-GTK is cross-platform!

>>> More PHP Articles          >>> More By K.K.Sou

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: