I am trying to create a applicatin with SWT Text widget. The Text widget should act as command prompt asking input but not allowed to be delete after pressed enter. but characters can be deleted on same line before enter. Is this possible? Thanks, Tor
Share
One approach is to set up a two widget layout. Create one component for holding the terminal screen (non-editable) and a
Textwidget that holds your input and is editable.Following API should give you an idea on how to implement this behavior:
Every
Textwidget has asetEditable(boolean)method to set wether it can be edited or not.You can pass constants from class
SWTto the constructor. Ex.:Maybe adding a
KeyListenerwill help you.