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
0002722 [JEDI VCL] 00 JVCL Components minor always 2005-03-07 04:38 2005-03-10 14:52
Reporter marcgeldon View Status public  
Assigned To user72
Priority normal Resolution fixed  
Status resolved   Product Version 2.10
Summary 0002722: TJvEnterAsTab does not react on Checkboxes
Description Hello!

Because checkboxes are inherited from TButtonControl TJvEnterAsTab does not react on checkboxes. BUT: with an ENTER on a checkbox you can do NOTHING. Just a "space" helps you to change the value.

So we should make TJvEnterAsTab possible to work with checkboxes.


Best wishes from Germany,

Marc Geldon
(PRO IT SYSTEMS -> www.proitsystems.de)
Additional Information ===== OLD VERSION FROM JvEnterTab.PAS =====
procedure TJvEnterAsTab.CMDialogKey(var Msg: TCMDialogKey);
begin
  if (GetParentForm(Self).ActiveControl is TButtonControl) and (FAllowDefault) then
    inherited
  else
  if (Msg.CharCode = VK_RETURN) and FEnterAsTab then
  begin
    GetParentForm(Self).Perform(CM_DIALOGKEY, VK_TAB, 0);
    Msg.Result := 1;
  end
  else
    inherited;
end;

===== NEW VERSION FROM JvEnterTab.PAS =====
procedure TJvEnterAsTab.CMDialogKey(var Msg: TCMDialogKey);
begin
  if (not (GetParentForm(Self).ActiveControl is TCustomCheckBox)) and
     (GetParentForm(Self).ActiveControl is TButtonControl) and (FAllowDefault) then
    inherited
  else
  if (Msg.CharCode = VK_RETURN) and FEnterAsTab then
  begin
    GetParentForm(Self).Perform(CM_DIALOGKEY, VK_TAB, 0);
    Msg.Result := 1;
  end
  else
    inherited;
end;

Tags No tags attached.
Attached Files ? file icon JvEnterTab.pas [^] (3,316 bytes) 2005-03-07 04:55

- Relationships

-  Notes
(0006650)
user72
2005-03-07 09:54
edited on: 2005-03-07 09:55

Please upgrade to the latest version where there is an OnHandleEnter event where you can specify whether ENTER should be handled as tabs or not. In your case, you'd write something like this (set Handled to true to not convert ENTER to TAB):

procedure TForm1.JvEnterAsTab1HandleEnter(Sender: TObject;
  AControl: TWinControl; var Handled: Boolean);
begin
  Handled := (AControl is TButtonControl) and not (AControl is TCustomCheckBox) and not (AControl is TRadioButton);
end;

(0006655)
marcgeldon (reporter)
2005-03-07 23:25

Ok. Thank you very much for your information.
(0006657)
user72
2005-03-09 00:59

Can we close this issue?
(0006659)
marcgeldon (reporter)
2005-03-09 01:05

Yes. But just one question: I can't find the new JvEnterAsTab. I have downloaded and installed JVCL 3.00 RC1?
(0006660)
user72
2005-03-09 03:44

It seems someone has messed up the unit and removed the OnHandleEnter event. I'll sort it out and get back to you.
(0006680)
user72
2005-03-10 14:52

I've updated the JvEnterTab.pas in CVS with the OnHandleEnter event. Please try it out and post again if it doesn't work for you

- Issue History
Date Modified Username Field Change
2005-03-07 04:38 marcgeldon New Issue
2005-03-07 04:55 marcgeldon File Added: JvEnterTab.pas
2005-03-07 04:55 marcgeldon Issue Monitored: marcgeldon
2005-03-07 09:54 user72 Note Added: 0006650
2005-03-07 09:54 user72 Status new => feedback
2005-03-07 09:55 user72 Note Edited: 0006650
2005-03-07 23:25 marcgeldon Note Added: 0006655
2005-03-07 23:25 marcgeldon Issue End Monitor: marcgeldon
2005-03-09 00:59 user72 Note Added: 0006657
2005-03-09 01:05 marcgeldon Note Added: 0006659
2005-03-09 03:44 user72 Note Added: 0006660
2005-03-10 14:52 user72 Status feedback => resolved
2005-03-10 14:52 user72 Resolution open => fixed
2005-03-10 14:52 user72 Assigned To => user72
2005-03-10 14:52 user72 Note Added: 0006680


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