Copy link to clipboard
Copied
I have a script which sets font size for an edittext box. This works in Bridge 12 but not in Bridge 15 beta.
Below is a demo script that shows the problem.
try{
testWindow = new Window ('palette', 'font demo', undefined, {closeButton:true});
testWindow.orientation = 'column';
testWindow.alignChildren = ['fill', 'fill'];
testWindow.minimumSize = [300, 200];
testPanel = testWindow.add('panel', undefined, 'Test');
testPanel.orientation = 'column';
testPanel.alignChildren = ['fill', 'top'];
testPanel.margins = [10, 10, 10, 10];
testPanel.minimumSize = [250, 175];
testPanel.textbox = testPanel.add('edittext', undefined, 'ABC');
testPanel.checkbox = testPanel.add('checkbox', undefined, 'Larger');
testPanel.checkbox.value = false;
testPanel.checkbox.onClick = function(){
if(testPanel.checkbox.value == true){
if(Folder.fs == 'Windows'){
testPanel.textbox.graphics.font = 'Tahoma:16';
}
else{
testPanel.textbox.graphics.font = 'Arial:18';
}
}
else{
if(Folder.fs == 'Windows'){
testPanel.textbox.graphics.font = 'Tahoma:12';
}
else{
testPanel.textbox.graphics.font = '.AppleSystemUIFont:13';
}
}
}
testWindow.layout.layout(true);
testWindow.show();
}
catch(e){
Window.alert(e + e.line);
}
Have something to add?