I try to change the length of an edittext depending on a checkbox.
This is my code so far:
FormatSingle.z3 = FormatSingle.add('group'); FormatSingle.z3.Titel = FormatSingle.z3.add('edittext',undefined,"Zeile4"); FormatSingle.z3.Titel.characters = 15; FormatSingle.z3.ifSub = FormatSingle.z3.add('checkbox',undefined,"Unterzeile"); FormatSingle.z3.ifSub.onClick = function() { if (this.value == true) { FormatSingle.z3.Titel.characters = 23; w.layout.layout(true); w.layout.resize(true); } else { FormatSingle.z3.Titel.characters = 15; w.layout.layout(true); } }
('w' is my window, 'FormatSingle' is a defined variable (group))
For the layout-commands I tried multiple versions, like this one; without the 'true'; not with the 'w' but with 'FormatSingle', but the only thing happening (if anything happens) is that other Elements of my window move slightly around.