PxPlus User Forum

Main Board => Discussions => Nomads => Topic started by: Prajin P K on January 09, 2020, 06:20:09 AM

Title: Multi line control (GOTO)
Post by: Prajin P K on January 09, 2020, 06:20:09 AM
Hi all,


        We used multi line control "MULTI_LINE GOTO ctl_id" in one of the panel for field validation. its not focusing on the specified field while run in inomads. what will be the issue, please give the solution for this.
Title: Re: Multi line control (GOTO)
Post by: Mike King on January 09, 2020, 11:12:20 AM
Generally when using Nomads to set focus to a control you simply set NEXT_ID to the desired control XXXX.CTL value instead of using a "xxxxx Goto" or "Set_focus" directive. 

This is important in case the reason you got the change event was due to a field value being changed and the user pressing TAB.  If you simply change focus the TAB may still reside in the input queue thus the resultant focus may end up being the field after the control you tried to set focus to.

Setting NEXT_ID addresses this situation for both Nomads and iNomads.

If you MUST set focus try the SET_FOCUS directive instead of the MULTI_LINE GOTO.
Title: Re: Multi line control (GOTO)
Post by: Prajin P K on January 10, 2020, 01:33:33 AM
Thank you so much mike, NEXT_ID is working for me and can you please explain use of SET_FOCUS control? How its useful?
Title: Re: Multi line control (GOTO)
Post by: Mike King on January 11, 2020, 11:47:33 AM
It is the same as a XXXXXX GOTO ... but will set focus to any type of control.  Also setting focus to 0 will set focus to window itself when dealing with mixed text/graphical applications.

You can also use SET_FOCUS READ var to determine which control has focus.