Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change the active element on the form.
#2
(07-22-2021, 09:51 AM)Сергей Александрович Wrote: There is a desire to press the Enter key to go to the next information input field.
The option with event processing does not work.

procedure TfmPayTovarEd.edKOLAsyncKeyPress(Sender: TObject;
  EventParams: TStringList);
var
mValue  : String;
begin
  mValue := EventParams.Values['which'];
  if EventParams.Values['which'] = '13' then
  begin
    ActiveControl := edEDIZM;
    Self.Refresh;
  end;
end;


In Delphi, I constantly use the "ActiveControl := edEDIZM;" And for some reason it doesn't work in IW. Can you tell me how to do this?

Hi.

I think you could use the SetFocus method of the control.

Like this:

procedure TfmPayTovarEd.edKOLAsyncKeyPress(Sender: TObject;
  EventParams: TStringList);
var
mValue  : String;
begin
  mValue := EventParams.Values['which'];
  if EventParams.Values['which'] = '13' then
  begin
    [b]edEDIZM.SetFocus;[/b]
  end;
end;

I personally would like to find a way that Intraweb Form can jump to control in the TabOrder sequence using the Enter Key.
Reply


Messages In This Thread
RE: How to change the active element on the form. - by Rolphy Reyes - 07-22-2021, 01:36 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)