how to update label text on button click or renitilize the label text
public void createControl(Composite parent) {
.
.
.
final Label label_6 = new Label(container, SWT.NONE);
label_6.setText("");
.
.
.
}
Button button = new Button(container, SWT.NONE);
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
System.out.println("lksjdalkf");
label_6.setText("kjhawdjhfjawrefffffffffffkh");
}
});
on button click i nnned to update the label content
its not display the new text
even after inviking redraw or update method for label can any one tell whts is the problem
On 26.10.2010 18:51, ashok_kumar_rr@yahoo.com wrote:
> Hi,
>
> how to update label text on button click or renitilize the label
> text public void createControl(Composite parent) { . . . final Label
> label_6 = new Label(container, SWT.NONE); label_6.setText(""); . . .
>
> } Button button = new Button(container, SWT.NONE);
> button.addSelectionListener(new SelectionAdapter() { @Override public
> void widgetSelected(SelectionEvent e) {
> System.out.println("lksjdalkf");
> label_6.setText("kjhawdjhfjawrefffffffffffkh"); } });
>
> on button click i nnned to update the label content its not display
> the new text even after inviking redraw or update method for label
> can any one tell whts is the problem
Please read the documentation of the valid style flags for the
constructor Button (Composite parent, int style) - SWT.NONE is not a
valid one for org.eclipse.swt.widgets.Button.