View Issue Details

IDProjectCategoryView StatusLast Update
0002722JEDI VCL00 JVCL Componentspublic2005-03-10 14:52
ReportermarcgeldonAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.10 
Target VersionFixed in Version3.00 
Summary0002722: TJvEnterAsTab does not react on Checkboxes
DescriptionHello!

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;

TagsNo tags attached.

Activities

2005-03-07 04:55

 

JvEnterTab.pas (3,316 bytes)

user72

2005-03-07 09:54

  ~0006650

Last edited: 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;

marcgeldon

2005-03-07 23:25

reporter   ~0006655

Ok. Thank you very much for your information.

user72

2005-03-09 00:59

  ~0006657

Can we close this issue?

marcgeldon

2005-03-09 01:05

reporter   ~0006659

Yes. But just one question: I can't find the new JvEnterAsTab. I have downloaded and installed JVCL 3.00 RC1?

user72

2005-03-09 03:44

  ~0006660

It seems someone has messed up the unit and removed the OnHandleEnter event. I'll sort it out and get back to you.

user72

2005-03-10 14:52

  ~0006680

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 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-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