Forum > KOL

WinCE and TAB

(1/2) > >>

JohnvdWaeter:
Hi All,

How to Tab from Edit1 to Edit2 using the keys on Smartphone or Pocketpc?

Or, using the KOL-CE-objects, how to Tab from Editbox1 to Editbox2?

Not all devices have touchscreens...

tia!
John

arnoldb:
John, what I do is to use the Enter key - Set the form's keypreview to true, then assign the form's keypress event, and check for the nominated key to move focus to the next control - example for using Enter:

procedure TForm1.FormKeyPress(Sender:TObject; var Key:char)
begin
  if Key = #13 then  //Enter is #13
  begin
     form1.SelectNext(form1.ActiveControl,true,true);
     key:=#0;
  end;
end;

You can also change the key used; example down-arrow etc.

JohnvdWaeter:
Arnold,
Yes, tried that approach, a bit expanded with different handling depending on the sending object. #13 is sometimes needed in comboboxes and memo's, same for up's and downs... and the selectnext does not test for visibility (I have offscreen-controls that become selected). I guess there is no other way then handling such keys per control.
Thanks anyway! :-)

John

yuriy_sydorov:
JohnvdWaeter: Set Tabulate or TabulateEx for a form and keyboard navigation will be enabled (or call Tabulate or TabulateEx methods if you do not use MCK).

JohnvdWaeter:
Hi Yury,

Right, thats works... except if there is TKolMemo. I guess I have to handle that one myself...

Thanks!
John

Navigation

[0] Message Index

[#] Next page

Go to full version