Jump to content


Photo

The transition between the Contorls by "Enter" key


  • Please log in to reply
3 replies to this topic

#1 Volk65

Volk65

    Member

  • uniGUI Subscriber
  • PipPip
  • 43 posts
  • LocationMSK, Russia

Posted 10 February 2018 - 12:40 PM

Hi!

There are several controls on the form. All controls have code written to the OnKeyPress event that moves the input focus by pressing the "Enter"key.

In UniMainModule.NavigateKeys.SelectText: = True. When you switch from one control to another by pressing "Tab" - all the text is highlighted. But when I click on "Enter" a transition to another control occurs but the text is not highlighted.

I need the whole text to stand out at the entrance to cotnrol . Or can it be done differently?

Attached Files


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4119 posts

Posted 10 February 2018 - 12:49 PM

Hi,

 

Have you seen this demo example ?:

\FMSoft\Framework\uniGUI\Demos\Desktop\FormNavigate

Best regards,


  • 0

#3 Volk65

Volk65

    Member

  • uniGUI Subscriber
  • PipPip
  • 43 posts
  • LocationMSK, Russia

Posted 10 February 2018 - 02:29 PM

Thank You.

Apparently, when I studied the demonstration I did not remember this example.

But there is one small problem. First control does not highlight the entire text.

And it manifest in all dialog boxes.

Attached Files


  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4119 posts

Posted 10 February 2018 - 02:58 PM

Also you can use selectOnFocus config for this:

JSConfig('selectOnFocus', [True]);

For example:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniEdit1.JSInterface.JSConfig('selectOnFocus', [True]);
end;

Best regards,


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users