This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to request focus ?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 06, 2006
01:20 AM
How to request focus ?
In a custom dialog,there are some ISTextfeild.
I added a listener to query exit.
public void queryExitXXXDialog(com.installshield.event.ui.ISDialogQueryContext arg0) {
if ( A_IsTextfield.getText().length() == 0 ) {
arg0.getWizardUI().displayUserMessage("Error","Please input arguments!",WizardServicesUI.ERROR);
arg0.setReturnValue(false);
A_ISTextfield.requestFocus();//how to make A_IsTextfield request Focus ?
//coz I have many ISTextfield to validate their values, I have checked the advance api of Installsheild for ISTextField, but I can't find any requestFocus() method likes Swing does.
return;
}
}
any ideas?
thanks for help
I added a listener to query exit.
public void queryExitXXXDialog(com.installshield.event.ui.ISDialogQueryContext arg0) {
if ( A_IsTextfield.getText().length() == 0 ) {
arg0.getWizardUI().displayUserMessage("Error","Please input arguments!",WizardServicesUI.ERROR);
arg0.setReturnValue(false);
A_ISTextfield.requestFocus();//how to make A_IsTextfield request Focus ?
//coz I have many ISTextfield to validate their values, I have checked the advance api of Installsheild for ISTextField, but I can't find any requestFocus() method likes Swing does.
return;
}
}
any ideas?
thanks for help
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 06, 2006
07:10 AM
I do not think this can be done With IS Universal! I've asked in the past to no avail!
Not only that - if you notice when you install the Universal and have to put the product key - you have to Tab to the next field; which leaves me to believe that if it could have been done - they wouldv'e did it here when you entered the appropriate number of text in the field to give the next text box focus!
At least that's what I was trying to do and couldn't find a way of doing!
If you find a way - please let me know!
Regards,
Tom
Not only that - if you notice when you install the Universal and have to put the product key - you have to Tab to the next field; which leaves me to believe that if it could have been done - they wouldv'e did it here when you entered the appropriate number of text in the field to give the next text box focus!
At least that's what I was trying to do and couldn't find a way of doing!
If you find a way - please let me know!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 18, 2007
06:36 AM
In import field :
import com.installshield.ui.controls.*;
import javax.swing.JTextField;
This is how we get focus for a text box
ISTextField nextTextField = (ISTextField)arg0.getISContainer().getControl("ISTextFieldDef1");
JTextField jText = (JTextField) nextTextField.getNativeComponent();
jText.selectAll();
jText.requestFocus();
import com.installshield.ui.controls.*;
import javax.swing.JTextField;
This is how we get focus for a text box
ISTextField nextTextField = (ISTextField)arg0.getISContainer().getControl("ISTextFieldDef1");
JTextField jText = (JTextField) nextTextField.getNativeComponent();
jText.selectAll();
jText.requestFocus();