PDA

View Full Version : [CLOSED]FormPanel setReadOnly doesn't work if i add a field after setReadOnly to true



lucasas
20 Jun 2008, 12:30 PM
Hi Darrell

TextField is not readonly when i do this:
[code]
formPanel = new FormPanel();
formPanel.setHeaderVisible(false);
formPanel.setFrame(true);
formPanel.setWidth(210);
formPanel.setLabelWidth(100);
formPanel.setButtonAlign(HorizontalAlignment.RIGHT);
formPanel.setWidth(390);
formPanel.setStyleAttribute("padding", "10");
formPanel.setReadOnly(true);

loginText = new TextField();
loginText.setFieldLabel("Usu

darrellmeyer
22 Jun 2008, 6:06 AM
setReadOnly changes the current fields read-only state at the time of execution. If you add fields, you will need to call the method again as needed.