Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Change text to read only
Change text to read only [message #534307] Tue, 18 May 2010 11:24 Go to next message
Eclipse UserFriend
Hello peoples

Is there any way to change an existing Text widget to read only, when it was
constructed without the SWT.READ_ONLY flag?
Re: Change text to read only [message #534322 is a reply to message #534307] Tue, 18 May 2010 12:23 Go to previous messageGo to next message
Eclipse UserFriend
That would be a hack...

text.addVerifyListener(new VerifyListener(){
public void verifyText(VerifyEvent e){
e.doit=false;
}
});
Re: Change text to read only [message #534718 is a reply to message #534307] Thu, 20 May 2010 02:41 Go to previous messageGo to next message
Eclipse UserFriend
geejay wrote:
> Hello peoples
>
> Is there any way to change an existing Text widget to read only, when it
> was constructed without the SWT.READ_ONLY flag?
You can use text.setEditable(false) API for making the text widget to
read only.
Re: Change text to read only [message #534740 is a reply to message #534718] Thu, 20 May 2010 04:28 Go to previous message
Eclipse UserFriend
Quote:
geejay wrote:
> Hello peoples
>
> Is there any way to change an existing Text widget to read only, when it
> was constructed without the SWT.READ_ONLY flag?
You can use text.setEditable(false) API for making the text widget to
read only.


Yes that would be a better way,i missed it.
Previous Topic:[INFO]When you dont get response to your posts.
Next Topic:How to re-layout controls in a view
Goto Forum:
  


Current Time: Wed Jul 23 06:21:28 EDT 2025

Powered by FUDForum. Page generated in 0.03116 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top