| masked value for swt text field based on indicator [message #759834] |
Wed, 30 November 2011 04:18  |
sam mn Messages: 25 Registered: August 2010 |
Junior Member |
|
|
trying to make characters typed into a text into masked ones based on a checkbox indicator.
tried the below code, but it is not working:
valueText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if(maskIndicator.getSelection()){
valueText.setEchoChar('*');
}
}
});
why is echoChar not working??
can someone guide me, what i am doing wrong here.
[Updated on: Wed, 30 November 2011 11:14] Report message to a moderator
|
|
|
| Re: masked value for swt text field based on indicator [message #760124 is a reply to message #759834] |
Thu, 01 December 2011 06:52   |
 |
Lakshmi Shanmugam Messages: 271 Registered: July 2009 Location: India |
Senior Member |
|
|
Hi,
setEchoChar() doesn't work for Text with SWT.MULTI style. Are you using SWT.MULTI or SWT.SINGLE style?
Also, since you are using the echo character based on the checkbox indicator, it is better to set and unset the echo character using setEchoChar() in the checkbox's selection listener.
Lakshmi P Shanmugam
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01886 seconds