Skip to Content
avatar image
Former Member

Focusing a text field

Hi,

I have an input field in a view. This field is not getting focused when the view appears. What I mean is the cursor is not appearing in the field when the view appears and once the user taps on the field, it is focusing. So without tapping, how we can acheive this functionality.

Regards

MQ

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 26, 2010 at 01:41 PM

    get the AttributeInfo of the Context Node represented by the form element.

    IWDAttributeInfo attribute = wdContext.nodeA().getNodeInfo().getAttribute(A.theattribute);
    
    wdThis.wdGetAPI().requestFocus(currentAElement(), attribute);

    (assuming you an element named A with an attribute called "theattribute")

    Hope that helps

    Jan

    Add comment
    10|10000 characters needed characters exceeded