DFL, the D Forms Library, is an easy to use user interface toolkit for the D programming language.
It brings you a high level, easy to use interface, abstracted from the native API.
"Thanks for allowing me to be in the world of Windows. I hated Windows programming until DFL."
"DFL is very easy to use once you see how it works. It's even similar to Windows Forms of .NET.
So I think of D+DFL as a good alternative to C#+.NET.
Also, DFL has Entice Designer which makes it even easier."
With DFL you can:
- Create and manage your GUI application with a simple, object-oriented interface.
- Attach event handlers to many objects, such as controls, forms, and menus, for practically any event.
- Dock controls on the parent form, so resize code isn't needed.
- Use sockets that do not block the GUI thread.
- Much more!
DFL now works with
D1, D2 and Tango!
Entice Designer also released; a new version
of the GUI builder.
As before, there's always new conversations happening over in the
Final Update: DFL will no longer be maintained by dprogramming.com
Please see the GUI Libraries wiki page for DFL forks.
A new DFL snapshot is available (RC4)
Download DFL 0.9.8 installer for an older version of DMD
or DFL 0.9.8 zip archive
Tested with DMD v1.030 and DMD v1.036.
Tested with Tango 0.99.7 with DMD v1.033.
Be sure to read the
DFL tutorial for setup and usage instructions.
The included examples are a good starting point.
The download includes:
- The DFL library that can be used with closed source and commercial applications.
- dfl.exe tool that should simplify compiling DFL projects.
- Source code for DFL and many examples.
Should work on Microsoft Windows 95 and above.
However, on Windows 95, some features require an up to date
version of Internet Explorer to be installed.
There are functions to call to test for these features.
New to DFL? Need to get started?
First, check out the
which also includes setup and usage instructions.
The installer will give you start menu shortcuts, one of which takes you to the Examples Folder.
The provided DFL examples show how to use a lot of the features,
as they are used to test the library between releases.
The online documentation
can be used to find the available members.
The documentation is far from complete, but can be edited by those who wish to contribute.
Entice Designer, a Form Designer for DFL,
is also helpful to newcomers because the properties
are easily accessible in a convenient list including descriptions.
Entice also has a tutorial available.
Also new to the D language? Check out the "New D Users" section on the
dprogramming.com home page.
Classic hello world example:
myForm = new Form;
myForm.text = "DFL Example";
myLabel = new Label;
myLabel.font = new Font("Verdana", 14f);
myLabel.text = "Hello, DFL World!";
myLabel.location = Point(15, 15);
myLabel.autoSize = true;
myLabel.parent = myForm;
There are many more examples in the DFL download.
More screenshots are here.
What changed since the last version of DFL? /
How do I ensure my code is still compatible with DFL?
See the changelog
for a list of library changes.
I need help, how can I get support?
The DFL forum
is the primary medium for support.
There is also the contact form
and freenode #DFL
Does DFL work with the Tango library?
DFL does support the Tango
See the DFL Tango
page for more information.
Either Phobos (std) or Tango can be used as you prefer.
Is Unicode supported?
On Windows NT/2000/XP/2003/Vista, Unicode is fully supported;
on Windows 95/98/ME, DFL translates to and from ANSI as necessary to support Unicode (much like MSLU and Phobos).
The Unicode translation appropriate for the Windows version is automatic and
both Windows types are supported simultaneously.
To override this, such as to build an exe for only NT+,
versions can be set
Will there be a linux version?
Porting has begun
! (Posted May 2007)
I've added an event handler using the delegate keyword
or a nested function
and I'm getting access violations. Why is this?
Delegate literals and nested functions only work if you're sure the event
won't be fired after the function it's in returns. Use a non-static member function:
class MyForm: Form
click ~= &form_click; // Add click event handler.
private void form_click(Object sender, EventArgs ea)
// Handle event here.
How do I safely load regular text files or other 8-bit text into a DFL control?
Because DFL (and most of D) expects clean UTF-8, this can be a problem when working with external text.
This is covered on the load 8-bit text
hosted by dsource.org!
Check out the new Entice Designer project! A GUI Builder for DFL.
The start of new documentation is available here.
It doesn't explain much yet, but it's often easier than going through the code,
and you're welcome to add directly to it.
Please report bugs and comments to the
or the contact form.
You can make requests and I'll see what I can do to get them
in the next release.
See the snapshots for changes in the next DFL release.
Previous DFL versions: