I wrote about autocompletion for TEdits before here, here and here. My dzlib contains several helper functions to add TEdit-autocompletion for directories, files (with a filter) and generic strings from a string list. All of them worked fine for me and were used in several our internal programs. But that changed when trying them with … Continue reading Autocompletion for TEdits fixed for Delphi 11 and later
Category: dzLib
An improved Abstract Error Handler for Delphi
NOTE: The original blog post was wrong in one point: The change happened in Delphi XE2, not 10.2. I have now updated this and also adapted the conditional compilation in u_dzAbstractHandler. I should also mention, that the code only works on Win32. Win64 and other platforms are not supported. But since that unit won't compile … Continue reading An improved Abstract Error Handler for Delphi
TdzSpeedBitBtn updated to support scaling
4 years ago I wrote a helper class TdzSpeedBitBtn which turns a TBitBtn into a TSpeedButton that can have the focus. That helper class has also been used in GExperts (in the Uses Clause Manager and Rename Components). It worked fine until Delphi 11 introduced per monitor DPI awareness. Then it still worked but the … Continue reading TdzSpeedBitBtn updated to support scaling
When computers try to be clever
Don't you just hate it when computers try to be clever but get it wrong? OK, it's not really the computer itself but the programmer who tried to be clever. The problem usually is that he overlooked a corner case that you then hit where his sophisticated strategy fails and leaves you with something - … Continue reading When computers try to be clever
TCsvWriter added to dzlib
Yes, I know, there are many already existing solutions for writing a CSV file in Delphi. And some are probably better than mine (for general purpose usage), but those I looked at had too many shortcomings for my particular use case, so I wrote my own. (There might also have been some not invented here … Continue reading TCsvWriter added to dzlib
Setting the drop down width of a Combobox in Delphi
By default, the width of the drop down list of a TComboBox is the same as the width of the control itself, and even in the latest Delphi version there apparently is no property to set it. Why is that so? Good question. There are probably many third party controls that offer this because it … Continue reading Setting the drop down width of a Combobox in Delphi
Autocompletion for TEdits revisited
I wrote about autocompletion for TEdits before here and here. Back then I was using the SHAutoComplete API function in the Shlwapi.dll because I am a lazy basterd™. That hasn't changed really but I also love fiddling with stuff, so some years ago, I actually added directory and general string completion to dzlib (and apparently … Continue reading Autocompletion for TEdits revisited
Fake TSpeedButton based on a TBitBtn – updated
I have made a few changes to the code in Fake TSpeedButton based on a TBitBtn: I replaced all that line drawing with a call to the WinAPI function DrawEdge. I set both bitmaps to Transparent. I moved the bitmap generation to a sub procedure. Thus I got rid of about 20 LOC. That's negative … Continue reading Fake TSpeedButton based on a TBitBtn – updated
TdzStreamCache class for caching access to any TStream
You might have noticed that I haven't blogged as much as usual and that there have been no recent updates to GExperts either. The reason of course was that I was busy doing other things. Some of them were programming related and one of these was writing a caching class wrapper for TStream descendants (e.g. … Continue reading TdzStreamCache class for caching access to any TStream
Bugfix for the Build Connection String dialog appearing on the wrong monitor
According to MSDN the window handle passed to IDBPromptInitialize::PromptDataSource will be used this way: hWndParent [in] The parent window handle for dialog boxes to be displayed. The dialog box will always be centred within this window. Unfortunately it doesn't work like this: If the parent form is on a secondary monitor the dialog is shown … Continue reading Bugfix for the Build Connection String dialog appearing on the wrong monitor