cancel
Showing results for 
Search instead for 
Did you mean: 

cursor focus

Former Member
0 Kudos

HI ,

I have text edit UIelement in my application.Intially i am displaying data in that UI element.Now my requirement is i have edit button when i click that edit button i am displaying current date and i need mouse cursor focus("|" blinking) in that textedit UI elemnt after the date.Could anyopne give clue on this.

Regards,

Suresh

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Suresh,

Follow these steps:

1) Create a attribute in the context named view of type IWDView.

2) Write following code in the wdDoModify Funtion:


if(firstTime){
	  wdContext.currentContextElement().setView(view);
 }

3) Now use following code in the onActionEvent of button:


IWDView view = wdContext.currentContextElement().getView();
IWDTextEdit textEdit = (IWDTextEdit)view.getElement("TEXTEDIT_ID");
textEdit.requestFocus();

This will take your cursor to the text edit box.

I hope this solves the issue. Please revert back in case you need further help on this.

Thanks and Regards,

Pravesh

Former Member
0 Kudos

Hi Pravesh,

I already done these code recently but the cursor not focusing in the TextEdit UI element.Actaully i want this cursor focus after date what i am printing.Is it possible to set cursor after the date.

Regards,

Suresh

pravesh_verma
Active Contributor
0 Kudos

Hi,

No this is not possible. You can just set the cursor focus to the UI element field, not specifically at the end of the date.

I hope this information helps.

Thanks and Regards

Pravesh

Answers (0)