Articles, tips, techniques on Delphi components writing. Plus free code Delphi custom components.
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.
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.
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.
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.
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.
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.
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...
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.
Everything about creating custom components in Delphi. The ultimate source.
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.
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.
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.
Learn how to create a data-aware TButton Delphi control.
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.
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.
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.
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).
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.
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.
"The Windows 98 'Run' dialog, and other programs, have implemented a very user friendly feature known commonly as text completion"
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.
Component for creating and modifying Windows Shortcuts.
Creating a TFileCopy component.
Extending the TStream class.
"Can I resize the drop-down list of a TComboBox so that I can see the complete text of its items?"
A serial port only does two things: send and receive data. What could be simpler? Well, there is a lot that has to happen to send that data to the port.
Take a leisurely stroll through the VCL source code, removing its mystique and seeing what insights we can gain.
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.