I am trying to create a large white box in a SWT window to display information. I want to look different from this one label, but I also want to be non-editable.
So far, I'm able to create a noon-editable text box with only gray back (top). I am aiming to meet with a (with If you actually use to a white background, then you can use a normal However , as previously mentioned by Ezine, you should stay in UI conferences, because for other reasons users can not be confused ... Here is some code that reads the list (under
text ).
List This can only display text on a row per list item. I need to display the paragraph text.)
text and Can stop it from editing.
text with the "normal" background:
public static zero main (string [] args) { Display display = new display (); Last Shell Shell = New Shell (Display); Shell.setText ("StackOverflow"); Shell.setLayout (new FillLayout ()); Text text = new text (shell, SWT.BORDER); Text.setText ("Read Only"); Text.addListener (SWT.Verify, new listener) {@Override public void handleEvent (event e) {e.doit = false;}}); Shell.pack (); Shell.setSize (600, 60); Shell.open (); While (! Shell.isDisposed ()) {if (! Display.readAndDispatch ()) display.sleep (); } Display.dispose (); }
No comments:
Post a Comment