on 10-26-2007 2:33 PM
This seems to be a trivial question, but I couldn't find the answer.
How can you programmaticaly give an ui element the focus or at least make sure it's visible (similar to html anchors) ?
Thanks
Hi Pieter,
You have a Ui Element like inputfield
(a)If you want to focus this inputfield then
IWDInputField input=(IWDInputField)view.get(id of inputfield);
input.requestFocus();
if you want make it visible:-
input.setVisible(WDVisible.NONE);
or
input.setVisible(true);
Regards,
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
unfortunately you can only access your UI elements only in WDDoModifyView and thus you can set its focus over there. If you need to set its focus only in case of some event then you can set some flag in that event and in WDDoModifyView.. You can first check the flag and based on that you can decide to set its focus.
Regards,
Murtuza
Hi Pieter,
To control the visibility, there is a property called visible for each UI element. If u want to do it programmatically,u can use this code in wdDoModifyView method
e.g. i m giving u the code for input field
IWDInputField field = (IWDInputfield)view.getElement("ur element id");
field.setVisible(true/false);
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.