1. Technology
Send to a Friend via Email
RTL referenceGlossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link To
 
Delphi Add-On : Current Headlines in Delphi Programming
Developing a simple OTA menu expert with Delphi. With this add-on you can get the current headlines listing without even leaving the Delphi IDE!
 More of this Feature
• Download Delphi 7 version
 Join the Discussion
"Post your views, comments, questions and doubts to this article."
Discuss!
 Related Resources
• OTA: tutorials
• Wizards: collections
• Simple HTML page scraping
• *Current Headlines* Sticker

In response to one of my previous articles, "Simple HTML page scraping with Delphi", I got several email messages with developers asking me "what would be the easiest way of accessing the About Delphi Programming "In the Spotlight" (current headlines) directly from the Delphi IDE?"

Hm, directly from the IDE... what else could I do then to develop an Delphi IDE add-on, or a wizard/expert if you like more, that brings the news to your computer without the need to leave the Delphi IDE!

Note: If you have a web page of your own, with one simple line of code, you can have the About Delphi Programming *Current Headlines* embedded right into your HTML pages! There's no updates to do, and you can be guaranteed that it will always be up-to-date with our latest content.

Wizard, expert, OTA?!
If you unfamiliar with the words from the upper title, here are some facts to help you understand "why" and "how" was this add-on developed.
Delphi comes with the great IDE, as you already know. What you might not know is that Borland has made this IDE extensible and remarkably flexible to allow developers to change the environment to suit their individual development needs. This gets done by utilizing something called the OpenTool Interface. I've collected a large amount of articles that explain OTA to help you start extending your Delphi IDE.
To be able to create experts/wizards, be sure you own the Professional or Enterprise edition of Delphi.

   Delphi IDE add-on. About Delphi Programming: Current headlines
To create this add-on I've started by creating a new design time package, adding a unit that wraps the IOTAMenuWizard and a form (code) to display the news. This time, I'm presenting you with the result of my work. In the next article I'll show you the code behind this expert.

About Box: Current Headlines: Delphi IDE Add-On

   Installing the Add-On
To start, first download the compiled package (~ 45 Kb) and save it in the \Delphi\Bin folder.

To install this Add-On, follow the steps:

  • On the Delphi main menu, go to Component | Install Packages. You'll get a list of installed design time packages.
  • Click the Add button
  • In the 'Add design package' browse to \Delphi\Bin and pick the ADPHeadlinesX.bpl file (where X stands for your Delphi version). This will add the 'About Delphi Programming: read the current headlines...' to the list of design packages
  • Click OK to close the dialog box.

   Getting the news
Now, that you've successfully installed the expert, it's time to see it in action. Point to the Help menu, and select: 'About Delphi Programming: read the current headlines...'. Click the Refresh button, and wait for a minute (util headlines are fetched and processed by the Add-In).

Inside the IDE

Note: You must be connected to the Internet for this add-on to work properly. When you click the Refresh button, the code behind the expert downloads the new and hot listing, does some HTML code manipulation (as explained in the ..scraping.. article) and displays the information inside the ListView.
Simply point to the Title of the news you are interested in, and click it. This will open up your Internet Browser and display that page for you.

All graphics (if any) in this feature created by Zarko Gajic.

 More Delphi
· Learn another routine every day - RTL Quick Reference.
· Download free source code applications and components.
· Talk about Delphi Programming, real time.
· Link to the Delphi Programming site from your Web pages.
· Tutorials, articles, tech. tips by date: 2001|2000|1999|1998 or by TOPIC.
· NEXT ARTICLE: Delphi on IRC.
Looking for an alternative way to enlarge your Delphi programming knowledge base? Why not try Delphi on IRC!
 Stay informed with all new and interesting things about Delphi (for free).
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?

©2014 About.com. All rights reserved.