1. Computing

2009. Delphi Programming by Zarko Gajic

Delphi Programming Almanac For the Year 2009

By

Edit and Display Boolean Fields using a CheckBox in Delphi's DBGrid - March 2, 2009
The article CheckBox inside a Delphi DBGrid provides one method of using a check box control to edit and display values for boolean fields. Rene, a visitor to this site, suggest an easier approach needing only two even handlers: OnCellClick and OnCustomDrawCell for your DBGrid control...

Book Review: Delphi 2009 Handbook by Marco Cantu - February 24, 2009
Marco's book is about the new Delphi features in Delphi 2009 for Win32.

5 Facts you Did Not Know about Delphi - OOP - Classes - VCL - ... - February 23, 2009
Have you ever created your own class in Delphi? Why not? It's easy. You did? Do you know that you can add your own properties and methods to a TEdit, or any class, without creating a new component? Here are some Delphi OOP specific tricks and goodies you should know of, to make your coding even more joyful :)

Cycle Enum Values in Delphi - Round Robin Enumeration Value Cycling - February 17, 2009
If you need to allow a user of your application to change the display of the ListView at run-time, you need to provide some sort of "selectable" user interface. You can choose to display enumerated properties in a selectable list. If you want to cycle through the possible set of values defined by an enum, you can implement a so called "round robin" algorithm.

Extend Delphi Components Without the Need to Install in the IDE; TButton = class(TButton) - February 16, 2009
Have you ever needed for a specific Delphi control, like a TButton, to have just one more property or a method that is a "must have" for your current application? What most beginners do not know is that they *can* create their own custom controls derived from the existing VCL set by creating a, so called, interceptor class that has the same name as the class being extended.

Force Display of ToolButton's PopupMenu in its OnClick Event - February 10, 2009
When a tool button is placed on a toolbar and tool button's Style is set to tbsDropDown, the button displays a down-pointing arrow. When you click the arrow the asociated popup is displayed. When you click on the actual button the popup is not displayed. Here's how to manually display a button’s pop-up menu on its OnClick event.

Append or Insert RTF from One RichEdit to Another - February 9, 2009
The TRichEdit control does not expose a method to append or insert a piece of RTF text. It does have a Lines property to let you add more text - but you'll have trouble if you want to append rich text formatted content - it will be added as a (ASCII) simple text. Here's how to append or insert RTF using rich edit specific callback functions.

Allow your Delphi Forms to Accept Dropped Files from Window Explorer - February 3, 2009
While drag and drop is implemented in the VCL, to accept files being from dragged from the Windows Explorer you need to handle a few shell api messages.

Single Line Comments in Delphi: a Handy Shortcut: CTRL + / - February 2, 2009
Proper commenting of your code will increase your code readability - using understandable description of what your code is doing. Sometimes you need to comment a line of code just to see how the application will live without it: comment it fast, uncomment it fast.

Convert Calculate MD5 Checksum for a File or String from Delphi - January 27, 2009
The MD5 Message-Digest algorithm is a cryptographic hash function. MD5 is commonly used to check the integrity of files. An MD5 hash value is a 32 digit hexadecimal number. Using Delphi, you can easily create a function to calculate the MD5 hash for a given file. All you need is included in two units (part of Indy): IdHashMessageDigest and idHash.

Convert Roman Number to Arabic / Integer Numbers using Delphi - January 26, 2009
An example of a different numeral system is the system of Roman numerals, which could represent all the numbers from 1 to 1,000,000 using only seven symbols: I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000. If Douglas Adams was in Rome at the time of writing his Guide, the definitive answer would probably be XLII ;)

A Real World Delphi Developer Question: Class Object Name Retrieval... - January 20, 2009
I've received this email from a visitor to the About Delphi Programming (this) site. Let's see if we all can help with answers. If you have an idea how to help Brandon, please add you answer using the "comments" link below this posting...

Override Global Screen.Cursor Change for a Cancel type Button - January 19, 2009
When you want to run a lengthy process in your application that needs no user iteraction, you can change the value of the Screen.Cursor property to have the mouse cursor display as a hourglass, for example, while the process is being executed. Here's how to have a cancel type of button that can override the global cursor shape.

TShellTreeView with CheckBoxes - Custom Delphi TShellTreeView Enhancement - January 13, 2009
This component cannot select individual files in a folder. As soon as a node is checked, all the files that it contains are enumerated and put in the list of selected files.

The Many Faces of Delphi Routines: Functions and Procedures - January 6, 2009
Here's an overview of how and when and for what you can use various "types" of Delphi routines: functions and procedures, function and procedure pointers, methods and method pointers, anonymous methods...

Sort a Generic Delphi List using an Anonymous Comparer Method - January 5, 2009
Delphi 2009 adds Generics and Anonymous methods to the Delphi language. When you have objects in some list - one of a commonly required tasks is to sort the list: either ascending, descending or using some list-specific algorithm. Using anonymous methods you can apply the sorting function directly "inline" with the call to the Sort method.

Delphi Almanacs: 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998.

  1. About.com
  2. Computing
  3. Delphi
  4. Coding Delphi Applications
  5. Delphi Almanac 2009 - Tutorials, Articles, Tips and Tricks by Zarko Gajic - Year 2009

©2014 About.com. All rights reserved.