FoxInCloud
Container - SetFocus
Gravatar is a globally recognized avatar based on your email address. Container - SetFocus
  Vincent H.
  All
  Oct 29, 2019 @ 01:22am

Hi Thierry,

With a container the focus on a textbox is ineffective.
To be sure, I launched in the same context a focus on a textbox alone (it works) and provoked with jQuery (it works).

Container.Text.SetFocus   && KO
Minstruc = 'input[id="ori_scx-pageframe1-page1-valgrid-texte"]'
THISFORM.wcScriptJSadd(textmerge([jQuery('<<Minstruc>>').focus();]))   && OK

Thanks in advance

Gravatar is a globally recognized avatar based on your email address. re: Container - SetFocus
  FoxInCloud Support - Thierry N.
  Vincent H.
  Oct 31, 2019 @ 06:50am

Hi Vincent,

In Web mode, awTxt::setFocus() calls .gotFocus().

awTxt::gotFocus() adds a similar code (modify class awtxt of aw method gotFocus); make sure to call dodefault() in your sub-class or object.

Gravatar is a globally recognized avatar based on your email address. re: Container - SetFocus
  Vincent H.
  FoxInCloud Support - Thierry N.
  Oct 31, 2019 @ 07:52am

Thank you Thierry but I don't understand your answer.
I only have a problem with a container.

Btn.Click -> Text.SetFocus && OK

Btn.Click -> Container.Text.SetFocus && KO

Gravatar is a globally recognized avatar based on your email address. re: Container - SetFocus
  FoxInCloud Support - Thierry N.
  Vincent H.
  Oct 31, 2019 @ 10:37am

do you have code in Container.Text.setFocus() or Container.Text.gotFocus() (in object of parent class)?

if so, make sure to call dodefault()

Gravatar is a globally recognized avatar based on your email address. re: Container - SetFocus
  Vincent H.
  FoxInCloud Support - Thierry N.
  Oct 31, 2019 @ 11:44am

It work's with dodefault() ! I have some code in Ctn.Texte.GotFocus() Thank's

But why is it different with container ?

Gravatar is a globally recognized avatar based on your email address. re: Container - SetFocus
  FoxInCloud Support - Thierry N.
  Vincent H.
  Nov 1, 2019 @ 04:38am

Why is it different with container?

Probably because you have code in .??tFocus() only in this case.

© 1996-2024