1. Technology
Send to a Friend via Email

Creating and enhancing VCL components

Articles, tips, techniques on Delphi components writing. Plus free code Delphi custom components.

TShellTreeView with CheckBoxes - Custom Delphi TShellTreeView Enhancement - 1/3
The aim of the article is to create a component that would allow a user to select files for a backup program in a user interface that would look like the left pane of the Windows Explorer or clone that of previous versions of Microsoft Backup. This was done using the ShellTreeView component and extending it. Full Delphi source code available for download.

Fake Creating a New Delphi Control
When you drop a Panel on a form, it will, by desing, have a default Caption set to something like "Panel1". I myself, in 99.99% cases, have to clear out the caption before adding any controls to it - I simply do not need a caption on a panel. Therefore, here's how to "fake" creating your own Panel control that has an empty caption by design.

TAdoConnectionEx - Custom Delphi Component With Source
Enhanced ADO connection component that prevents design-time database connections from being used at run-time unless explcitily allowed via the AllowStreamConnected property. Full Delphi source code included.

TFindFile - Custom Component with Free Source Code
Tired of using FindFirst, Next and Close? Come see how to encapsulate all those functions in a single "find-files-recursively" component. It's easy to use, free and with code.

TPictureClip - Custom Component with Source Code
Use the TPictureClip custom Delphi component to extract portions of a matrix of pictures and assign the "cell picture" to another picture control. Full source code included.

TTaskBarMenu - Windows TaskBar Custom Menu Delphi Component
To be able to fully customize the menu that appears when the Taskbar button is clicked and still operate on the TMenuItem objects you might need a custom menu component: TTaskBarMenu.

Don't use Delphi components! Use your own!
I'm going to be honest with you: I am not using any of the standard Delphi components when building any kind of a larger application! Read why...

Professional Looking Grids with Custom Drawing
Using custom drawing to make your grids look as nice as the expensive third party suites. Three main topics are presented: how to fix-up the column headers, how to add clickable buttons and checkboxes inside cells and how to simulate merged cells.

Custom Component Development
Everything about creating custom components in Delphi. The ultimate source.

TInstanceControl
Full source code of a Delphi component that can control the behavior of your application's multiple instances: with the option to limit the number of running instances. Part 2 of the Controlling the number of application instances article.

TFindFile
Tired of using FindFirst, Next and Close? Come see how to encapsulate all those functions in a single "find-files-recursively" component. It's easy to use, free and with code.

TMemoBar
MemoBar can be attached to a T(Custom)Memo component to provide additional info/functionality for a Memo component. TMemoBar displays: current line and column number, position of the textual cursor and the total number of characters. MemoBar adds "GoTo Line" and "overwrite" features to a Memo control.

TDBButton
Learn how to create a data-aware TButton Delphi control.

TColorButton
Full source code of the TColorButton Delphi component, an extension to the standard TButton control, with font color, background color and mouse over color properties.

TRichEditURL
Full source code of the TRichEditURL Delphi component, an extension to the standard RichEdit component. The TRichEditURL automatically recognizes URLs. Whenever the text in a RichEditURL matches the format of a URL, the control will display it as a hyperlink - when the link is clicked an event is raised enabling you to, for example, open a browser or send an email.

TadpDBDateTimePicker
Full source code of the TadpDBDateTimePicker Delphi component, a data-aware version of the standard TDateTimePicker - a visual component designed specifically for manipulating date and/or time (TDateTime) values.

TadpEdit
An extension to the standard TEdit control with properties like: ColorOnEnter (changes the background color of the control when it receives the input focus), Alignment (determines how the text in the edit component is aligned), and TabOnEnter (allows the edit control to react on the Enter key press as if the Tab key was pressed - sending the focus to the next control in the tab order).

TadpMRU
Full source code of a TadpMRU component, a non-visual component which simplifies implementing a "Most Recently Used" file list in a menu (or a popup menu). The TadpMRU component allows for quick selection of a file that was recently accessed (opened) in an application.

TInstanceControl
Full source code of a Delphi component that can control the behavior of your application's multiple instances: with the option to limit the number of running instances.

TNumEdit
TNumEdit is a component, just like TEdit, but it only accepts numerical input. You can adjust whether to accept positive or negative numbers or integer or decimals. You can also limit the input by using MinValue and/or MaxValue. Full source code.

How do I copy a file in Delphi?
Creating a TFileCopy component.

Resizing the Drop-down List of a TComboBox
"Can I resize the drop-down list of a TComboBox so that I can see the complete text of its items?"

VCL Sourcery
Take a leisurely stroll through the VCL source code, removing its mystique and seeing what insights we can gain.

Writing a URL Label
A URL Label is like a normal Delphi Label, but is written so that it looks and acts like a link in a HTML page. It looks like one due to its default color being blue and its also underlined.

©2014 About.com. All rights reserved.