A would like to add default text when the drop-down menu is loaded on my view. How can I do this in SWT and JFace?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m guessing what you want to do is to show something in the combo when it has been added to the view (it’s blank by default until something is selected or typed).
If you want to set a default text displayed until a selection has been made / until the field has been edited, e.g. – Select option –, then you can use:
Note, this is not possible if the Combo is SWT.READ_ONLY
If you want to set one of the values in the drop-down as default use the select method: