Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006544 [JEDI VCL] 00 JVCL Components minor always 2017-01-26 15:42 2019-04-13 15:39
Reporter akalwa View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0006544: TJvCustomComboEdit (and descendants) ignore the user's caret width setting
Description Windows allows users to change the caret width (text cursor width) to more than the default 1 pixel. While all contols derived from TCustomEdit work as expected, TJvCustomComboEdit and descendants ignore the user's setting.

The bug is in TJvCustomComboEdit.SetShowCaret().
Here the caret size is set as either 1 or 2 pixel, depending on the font's bold style. But that is not Windows' behaviour. Caret is usually not changed on font style. Instead the caret width should be read from the system settings:

procedure TJvCustomComboEdit.SetShowCaret;
  CaretWidth : Integer;
  if not SystemParametersInfo(SPI_GETCARETWIDTH, 0, @CaretWidth, 0) then
    CaretWidth := 1;
    if fsBold in Font.Style then
  CreateCaret(Handle, 0, CaretWidth, GetTextHeight);
Additional Information Control Panel -> Ease of Access Center -> Make the computer easier to see ->
Set the thickness of the blinking cursor
Change the default width from 1 to 3 pixel and apply the changes. [^]
Tags No tags attached.
Attached Files zip file icon [^] (1,491 bytes) 2018-07-18 22:18
? file icon JvToolEdit.pas.patch [^] (668 bytes) 2018-07-18 22:22

- Relationships

-  Notes
obones (administrator)
2018-07-18 15:52

Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this.
akalwa (reporter)
2018-07-18 22:22

The bug is still there in current git revision. The code in JvToolEdit.pas TJvCustomComboEdit.SetShowCaret() has not been changed.

I've attached a small demo application.
Compile and run the application; open Windows caret settings and change caret with to 4 or higher.
Switch back to the demo application and put focus to the TEdit box; the new caret width will be used. Put focus to the TJvComboEdit box; caret width is still 1.

Please apply attached patch to fix this bug (Sorry, no pull request; still using TortoiseSVN to access the master repository).
akalwa (reporter)
2018-07-18 22:23

On Windows 10, just type "Caret" into the start menu to open the settings.
akalwa (reporter)
2018-12-18 18:59

Any news on this?
Please someone grab the attached patch from 2018-07-18 and apply it the current source code. TIA
AHUser (developer)
2019-04-13 15:39

Fixed in master branch.

- Issue History
Date Modified Username Field Change
2017-01-26 15:42 akalwa New Issue
2018-07-18 15:52 obones Note Added: 0021520
2018-07-18 15:52 obones Status new => feedback
2018-07-18 22:18 akalwa File Added:
2018-07-18 22:22 akalwa Note Added: 0021559
2018-07-18 22:22 akalwa File Added: JvToolEdit.pas.patch
2018-07-18 22:23 akalwa Note Added: 0021560
2018-12-18 18:59 akalwa Note Added: 0021600
2019-04-13 15:39 AHUser Note Added: 0021679
2019-04-13 15:39 AHUser Status feedback => resolved
2019-04-13 15:39 AHUser Fixed in Version => Daily / GIT
2019-04-13 15:39 AHUser Resolution open => fixed
2019-04-13 15:39 AHUser Assigned To => AHUser

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker