Delphi and Lazarus
Trekking and Events
Blog and Forum
Čeština English
Main menu
Delphi and Lazarus
Top downloads

KControls Development Suite

KControls is a freeware distribution, a flagship of tkweb. It contains all of my published components for Delphi and Lazarus. All controls have been written with the aim to become both cross-IDE compatible (Delphi/C++Builder VCL and Lazarus LCL) and cross-platform compatible in Lazarus. There are some exceptions to this scheme, see below.

Components included
TKGrid - powerfull control for working with table data, replacement for TStringGrid and TDrawGrid - full compatibility and lot of new features
TKDBGrid - control for working with database tables, possible replacement for TDBGrid
TKMemo - native replacement for TMemo/TRichEdit - written from scratch, great features, full RTF support etc.
TKHexEditor - powerfull control for binary file editing
TKIcon - powerfull component for working with icons and cursors (files *.ico and *.cur, works only on Windows)
TKPrintPreview - control for displaying print preview, it is part of KControls built in printing capabilities, every visual control supports printing and previewing
TKPrintPreviewDialog - nonvisual component - dialog - for an easy print preview implementation
TKPrintSetupDialog - nonvisual component - dialog - for an easy implementation of printing preferences
TKCustomControl - a base for your visual controls, for which you want to implement e.g. printing and previewing capabilities in Delphi or Lazarus (just 2 short functions to write).
TKNumberEdit - edit control to input numbers in various formats
TKFileNameEdit - edit control to input file names
TKLinkLabel - label to show clickable link
TKGradientLabel - label with gradient background
TKLog - component for event logging
TKPercentProgressBar - custom drawn progress bar which shows actual percentage of the progress
TKBrowseFolderDialog - wrapper for the standard Windows API browse for folder dialog (works only on Windows)
TKBitBtn - like TBitBtn - draws PNG and alpha channel correctly in Delphi, has WordWrap property, works in Lazarus as well
TKColorButton - just another button to pick color


KControls is provided free on 'as is' basis, with complete source code. However, it is licensed software. More information about license can be found in source file headers.

All controls support Delphi and Lazarus IDEs fully. But there are some exceptions: TKIcon and TKBrowseFolderDialog work only on Windows and printing and previewing might not work in some widgetsets in Lazarus.

Note about cross-platform development in Delphi: I strongly disagree with the way Embarcadero took with the FMX library to allow cross-platform development, so FMX will never be supported. As Lazarus has become very good IDE, in many aspects better than Delphi, I recommend you try it if you need cross platform features.


If you want to donate for further development of KControls just think about building your own photovoltaics and using the WATTrouter device produced by our company. You will save lots of energy and it will be the best donation to me you can make!

Screenshots (click the images to enlarge)

KControls components (Windows Vista)KControls components (Windows XP/GTK2runtine)
KMemo rich text editor showing the KMemo manual.KMemo rich text editor showing more complex sample RTF document.

Downloading KControls

FileVersionNumber of
Available for:Changes
kcontrols_1.7.zip1.7638Delphi 7+,Lazarus 1.2.2+, C++Builder 2007+support for RAD Studio XE8, major work on TKMemo which is already usable, bugfixes...
kcontrols_1.6.zip1.62411Delphi 6+,Lazarus 1.2.2+, C++Builder 2007+support for RAD Studio XE6, Columns property in TKDBGrid, bugfixes...
kcontrols_1.5.zip1.5276Delphi 6+,Lazarus 1.2.2+, C++Builder 2007+new components TKMemo, TKBitBtn, TKColorButton, some bugfixes...
kcontrols_1.4.zip1.4914Delphi 6+, Lazarus 0.9.29(SVN#21827)+, C++Builder 2007+support for RAD Studio XE3-XE5, new components etc.
kcontrols_1.3.zip1.32654Delphi 6+, Lazarus 0.9.29(SVN#21827)+, C++Builder 2007+support for RAD Studio XE2
kcontrols_1.2.zip1.23019Delphi 6+, Lazarus 0.9.29(SVN#21827)+, C++Builder 2007+cumulative update (KGrid 1.7, KHexEditor 1.5, KIcon 2.2)
kcontrols_1.1.zip1.11047Delphi 6+, Lazarus 0.9.29(SVN#21827)+, C++Builder 2007+cumulative update (KGrid 1.6, KHexEditor 1.4, KIcon 2.1)
kcontrols_1.0.zip1.01625Delphi 6+,Lazarus 0.9.29(SVN#21827)+initial release (KGrid 1.5, KHexEditor 1.4, KIcon 1.9)

Home | Software | Delphi and Lazarus | Trekking, travelling | Sport | Others | Blog

Search in comments: 
inserted: 2015-10-06 06:52:21   Reply...
From: bflorac
Feature: TKMemo Add support for enhanced paragraph tab functions. This is support (ever so crudely) in TRichEdit. Some uses can be done with the existing TKMemo table support but it still would be a good feature.
inserted: 2015-10-05 07:37:37   Reply...
From: bflorac
Feature: TKMemo If you have an internal TPicture that you want to insert, there does not seem to be an direct way to do this. Calling AddImageBlock() needs to have a valid path. Once created, you can change the image. So, one can either allow a empty path or add a overloaded AddImageBlock() function that directly passes a TPicture.
inserted: 2015-10-05 07:26:00   Reply...
From: bflorac
Bug: TKMemo / TKMonoRTF PointsToTwips and TwipsToPoints are hard coded at 20. You should used GetDeviceCaps to get the correct value. function TwipsPerPixel: Extended; var DC: HDC; PixelsPerInch: Integer; begin DC := GetDC(0); // primary display (perhaps this could be improved) // assumes x and y are the same PixelsPerInch := GetDeviceCaps(DC, LOGPIXELSX); ReleaseDC(0, DC); result := 1440 / PixelsPerInch; end;
inserted: 2015-09-12 16:45:39   Reply...
From: vlad
KHexEditor issue on Delphi XE5: I do LoadFromStream and cursor of another editor (TSynEdit) dissapears. Digging into KHexEditor source, I observed that if I comment the lines 4725 (HideEditorCaret) and 4729 (DestroyCaret) solves the problem. However, I'm not sure about possible side effects. Please advise.
inserted: 2015-09-15 20:24:10   Reply...
From: tk
This is a bug. Put "else if elCaretVisible in FStates then" before the begin/end block where HideEditorCaret and DestroyCaret is called. This should prevent destroying the caret on LoadFromStream call when another window has focus and created the caret.
inserted: 2015-09-09 18:57:24   Reply...
From: Dibo
TKGrid - I have row selection but I still see selected cell (darker blue color). Is it possible to disable this? I want only row selection. Second question. I want use it as virtual table. Is there any built in solution for rows filtering?
inserted: 2015-09-15 20:10:32   Reply...
From: tk
1. Uncheck Colors.BrightRangeBkgnd property. 2. Row filtering is not implemented, you must write your own filtering. In virtual KGrid it is easy.
inserted: 2015-08-19 17:05:13   Reply...
From: bob8
Trying to install k-controls in Delphi 6 I get the error "CONTAINS clause is incorrect." Does anyone know what causes this error. I have the k-controls source path in the Delphi Library
inserted: 2015-08-19 23:13:57   Reply...
From: tk
Delphi 6 is not officially supported anymore.
inserted: 2015-08-17 09:55:44   Reply...
From: JimmyA
hi, I work with Rad Studio XE8 in Windows 10 1-Probleme whit TKHexEditor. Clic Replace = Yes. Clic Replace All = No. ??? (Hexa ou Normal text) 2-Probleme whit TMemoFram. Error Error launch. ???
inserted: 2015-08-18 18:22:37   Reply...
From: JimmyA
1- Thank you for ReplaceAll, This works very well. ---- 2- I place the TKMemoFrame component on the blank Form1 result: Access violation at 1D746F40 in the module ControlesDivers.bpl '. Reading the address 0000031C. ???
inserted: 2015-08-18 21:20:43   Reply...
From: tk
Cannot reproduce in my fresh XE8 (no other packs or experts installed). Creating at runtime (like KMemoEditor) works?
inserted: 2015-08-18 21:24:10   Reply...
From: tk
I know there was exception in Lazarus but never experienced this in Delphi (having 2 computers with misc. versions). In Lazarus KMemoFrame is not added to component palette because of this. Creating KMemoFrame at runtime should always work.
inserted: 2015-08-18 06:26:21   Reply...
From: tk
I could reproduce the 1.problem, is only bad ModalResult value on Yes To All button in the Replace dialog, should be mrYesToAll.
inserted: 2015-08-18 05:41:40   Reply...
From: tk
I don't understand this, what is exactly the problem?
inserted: 2015-08-18 18:32:14   Reply...
From: JimmyA
KControlsRXE8.bpl Not ControleDivers.bpl
inserted: 2015-08-13 15:50:05   Reply...
From: wcrs17133
After upgrading to KControls 1.7, I am getting runtime error "Error reading Grid.RowHeights: IInvalid value for property". No compile time error.
inserted: 2015-08-13 16:35:08   Reply...
From: tk
I can't find a problem in KGrid, or at least all the demos and my projects using KGrid run correctly. This error occurs when row heights stored in dfm don't match the RowCount property.
inserted: 2015-07-29 22:52:25   Reply...
From: brob
In IDE, opening a data source of an empty table causes kdbgrid access violation.
inserted: 2015-08-12 19:49:15   Reply...
From: tk
Should be fixed in rev. 1.7.
inserted: 2015-07-25 00:51:34   Reply...
From: KCa17d
Hi, very usefull and powerfull Grid, personaly a choose it to work with ;-) Like i'am newbe in delphi, i use the grid in the most simple way, as grid text display modify and save, KGrid.Cells[Col,Row] := Text So now a would like to use color in a individual Cell like : if KGrid.Cells[Col,Row] = 'TEXT' then begin KGrid.Cell[Col,Row].Font.Color := clWhite; KGrid.Cell[Col,Row].Brush.Color := clRed; end; Is there a similar way to do it in this simple way ?????
inserted: 2015-07-28 21:29:41   Reply...
From: tk
Look at the demo how to do this. Generally, if you want some specific painting you must still override OnDrawCell as in standard StringGrid (but then you can use the feature rich CellPainter property).
inserted: 2015-07-05 17:10:18   Reply...
From: tifa
HexEditor event OnChange. First it calls OnChange and after it insert the text. So query data.size in OnChange event useless. Any workarounds?
inserted: 2015-05-06 16:48:25   Reply...
From: fastsnake
Hello. Great work! I use the KControls with delphi XE8 but if i close the delphi IDE there is a access violation in rtl220.bpl. Have you a idea what could be the problem there? I also modified the package to compile and install successful with delphi XE8 (VCL. in uses, changed). Thanks
inserted: 2015-07-16 07:57:52   Reply...
From: bdkacz
I have the same issue (AV after close) with xe4 and xe5
inserted: 2015-07-28 17:34:33   Reply...
From: tk
Comment out REGISTER_PICTURE_FORMATS in The problem is in RegisterAlphabitmap procedure in KGraphics.pas.
inserted: 2015-04-28 09:08:55   Reply...
From: bdkacz
Hello. How can I force execute EditorDataToGrid from outside the grid - for example I have "save" button to save data from grid to database,but some users after enter data to last cell doesn't click to another cell to fire the EditorDataToGrid event = the cell is empty when I access it in save loop. So I must programically save entered text to grid for focused (in edit mode) cell (and then to database) - but how ?
inserted: 2015-07-28 17:36:17   Reply...
From: tk
Call EditorMode := False; This will disable the inplace editor and save its contents to grid.
inserted: 2015-04-13 20:02:59   Reply...
From: Sandman
Thanks for your great work on v1.6, but it seems the "empty recordset" bug is still there. While opening an empty recordset I get "External: SIGSEGV" at \source\kgrids.pas at line #8555. Variable "ARow" comes with -1. Line "if FCells[ARow, ACol] = nil then" causes access violation. I use SQLdb`s IBConnection + SQLTransaction + SQLQuery + DataSource + KDBGrid. Grid`s settings are default.
inserted: 2015-07-28 21:26:55   Reply...
From: tk
I'll look after this issue soon.
inserted: 2015-02-05 15:35:09   Reply...
From: DON
connecting zquery->datasource->kdbgrid get error ACCESS VIOLATION ?
inserted: 2015-01-03 15:27:40   Reply...
From: Marcio
In KGrid, when I make a row or column invisible it turns to a green line. Can I make it totally invisible or change this feature color?
inserted: 2015-01-08 20:04:42   Reply...
From: tk
Uncheck goIndicateHiddenCells in Options. This will disable the green line.
inserted: 2015-01-03 15:26:58   Reply...
From: Marcio
Hello. In KGrid, how can I change a ComboBox cell value not manually after the cells were created, by reading a file for example? And then, how to pick the index value of Combo Box cell?
inserted: 2014-11-06 19:20:51   Reply...
From: HobbyProgrammer
Thank you tk for your good work, I like your components in particular Tkmemo, i use lazarus and Tkmemo could be a good replacement for TRichEdit :) I use it to display Arabic text and everything is ok, but the calculation of the beginning and the end of the select text is incorrect since Arabic is written from right to left, if you can fix this problem I would be grateful :) thank you again and good continuation
inserted: 2015-01-08 20:06:03   Reply...
From: tk
TKMemo is not yet ready, please don't use it yet.
inserted: 2014-10-18 00:05:58   Reply...
From: Ivor
Do you have any examples of code in Windows Lazarus to show how to print preview in a program that currently prints directly to a printer Thanks
inserted: 2014-09-21 18:00:49   Reply...
From: Clericuzio
Please create correct packages for new Delphis, like XE6 or XE7, I had to update uses lists to namespace versions in all units to install components!
inserted: 2014-10-05 21:31:07   Reply...
From: tk
Won't be done to spare further ifdefs, have to support Lazarus as well... Use unit aliases or how the hell they are named in new Delphis...
inserted: 2014-10-05 21:37:46   Reply...
From: tk
Meant unit scope names in project options actually.
inserted: 2014-09-21 17:58:23   Reply...
From: Clericuzio
TKHexEditor looks to do not store AddressPrefix property if it set to EmptyStr.
inserted: 2014-09-17 20:51:36   Reply...
From: DwnTwn
Some KDBGrid inspector controls don't seem to have impact. Example: Table Font - while Use Parent Font is false, new setting seem to have no impact. Have not yet attempted font-changes via code.
inserted: 2014-09-17 20:49:05   Reply...
From: DwnTwn
Any examples (please point to link) using KDBGrid and cell-wordwrap? Any comprehensive (English) documentation?
inserted: 2015-01-08 20:08:01   Reply...
From: tk
There is help file in the package, using advanced features needs some testing on your side, can't describe everything...
inserted: 2014-09-15 00:34:30   Reply...
From: wadeauch
Thanks for your great work on TKIcon. I have identified a memory leak (latest version, and XE6) procedure TKIcon.CopyToPng(Index: Integer; Png: TKPngImage); ... Png.CreateBlank(COLOR_RGBALPHA, 8, ID.Width, ID.Height); Calling the CreateBlank constructor like this on an instance is risky and in this case the ChunkList in TPngImage does not get freed before creating a new instance. It needs to be replaced with something like this: Temp := TPngImage.CreateBlank(COLOR_RGBALPHA, 8, ID.Width, ID.Height); try Png.Assign(Temp); finally Temp.Free; end;
inserted: 2014-08-12 13:17:14   Reply...
From: Homerus
Any chance for a KDBTree component?
inserted: 2014-08-03 17:51:50   Reply...
From: hu
WordWrap does not work in KMemo,Is there a WordWrap and Table support planned?
inserted: 2014-08-04 11:17:56   Reply...
From: tk
Please don't use TKMemo yet! There will be massive changes (text layouts, image layouts, tables, left and right floats etc.).
inserted: 2014-08-03 08:54:09   Reply...
From: leledumbo
A little adjustment for Lazarus svn required in kgraphics: procedure TKHintWindow.ShowAt(const Origin: TPoint); begin // was ActivateHint in latest stable (1.2.4) or below ActivateWithBounds(Rect(Origin.X, Origin.Y, Origin.X + FExtent.X + 10, Origin.Y + FExtent.Y + 10), ''); end; I can't seem to find on which revision it happens.
inserted: 2014-08-04 11:38:35   Reply...
From: tk
Such changes will not be introduced in official KControls package unless there is stable Lazarus release which supports it. Please always adapt your copy if you want this feature to be compatible with SVN trunk.
inserted: 2014-07-26 16:19:00   Reply...
From: ED
how do you set columns properties please
inserted: 2014-07-27 12:52:32   Reply...
From: tk
Columns property implemented in v1.6, not 100% compatible with Delphi but I think it is usable. Check the demo.
inserted: 2014-07-26 06:33:36   Reply...
From: matsky
Is there a win64 support planned? When i try to install package there are errors on pointers casting and asm32 (mov eax instead of movd eax or mov rax & things like that on asm64).
inserted: 2014-07-27 12:51:33   Reply...
From: tk
Has been fixed in v1.6, ASMs removed. I don't know what you mean with pointer castings. I am able to install package in Delphi XE6 or Lazarus 64 bits and compile and run my demos under 64 bits.
inserted: 2014-07-18 10:48:26   Reply...
From: sky
I'd be VERY interested in a Columns editor as well.
inserted: 2014-07-27 12:45:31   Reply...
From: tk
Implemented in v1.6, not 100% compatible with Delphi but usable. Check the demo.
inserted: 2014-07-27 15:23:45   Reply...
From: sky
Thank you!!
Older comments
My account
Recently modified

KControls Development Suite

by: tk



by: tk



by: tk



by: tk


KGrid 1.3 released.

by: tk


Recently inserted


by: tk


My recent work on KMemo

by: tk


Update for RAD Studio XE2

by: tk


Slow progress

by: tk


Problem with comments and logins

by: tk


KControls released

by: tk