Tnt Extended Editors are components descended from the TNT Ware tnt Conrols.
The package includes:
- TTntExButtonEdit – A TntEdit with a button for launching dialiogs for example.
- TTntExDropDownEdit – A base implementation of tnt edit with a dropdown panel. If you want to create a drop-down control that is unicode compliant this is the place to start.
- TntExDropDownMemo and TntExDropDownRichEdit – Example drop down controls descended from TTntExDropDownEdit showing how easy it is to create them.
- TTntExDropDownVirtualStringTree – Dropdown version of the TVirtualStringTree from delphi-gems
- TTntExWinControl – A base control for deriving compound controls from. Paints themed edit-style border and handles Unicode hints using TNT unicode extensions the same as other tnt controls.
- TTntExIntegerEdit – Unicode version of a Spin edit, but unlike the Delphi spin edit, this supports all the up-down control properties like thousands display, etc. In addition, it gives the perception of the Spins being embedded in
the edit box rather than stuck on the end.
The TTntExDropDownEdit is written to take the hard work out of creating a Drop down control. I have designed this to handle all the focusing and pop-up window issues associated with implementing a drop-down, and to be easy to sub class when creating new types.
To create a new Drop-Down edit box type, simply:
- descend a new control from TTntExDropDownEdit
- override DoPopulatePanel, and create the control to be displayed in the panel. Set its parent to APanel, set it’s alignment to alClient.
- Implement the extended Key handling for Escape and Enter to close the DropDown.
That’s it. Simple and the controls are Theme aware as well.
These controls are copyright Matt Harrison. Feel free to use them in commercial and non-commercial applications. Please provide feedback and enhancements via the comments or email me.