Mohamed Hameed
New Member
- Messages
- 1
- Likes
- 0
Hello
I have a text with letters and numbers, and I created a dialog with 2 dropdowns.
I want to make the first change of characters for a particular font.
The second changes the numbers for another specified line I attached an example showing what is required.

This is the initial code I created and I want to complete the code
win = new Window('dialog',"قاعدة بيانات العملاء - ابن حميدو")
var tfontname = win.add ('statictext', undefined, "TextFontName");
tfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 15);
var textfontname = win.add("dropdownlist", undefined, "");
textfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 20);
textfontname.preferredSize = [200, 30]; textfontname.helpTip = "textfontname";
var Nfontname = win.add ('statictext', undefined, "Numberfontname");
Nfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 15);
var numberfontname = win.add("dropdownlist", undefined, "");
numberfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 20);
numberfontname.preferredSize = [200, 30];numberfontname.helpTip = "Numberfontname";
btn = win.add('button', undefined, 'Change')
btn.preferredSize = [200, 35];
btn.onClick = function() {
}
win.show()
I have a text with letters and numbers, and I created a dialog with 2 dropdowns.
I want to make the first change of characters for a particular font.
The second changes the numbers for another specified line I attached an example showing what is required.

This is the initial code I created and I want to complete the code
win = new Window('dialog',"قاعدة بيانات العملاء - ابن حميدو")
var tfontname = win.add ('statictext', undefined, "TextFontName");
tfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 15);
var textfontname = win.add("dropdownlist", undefined, "");
textfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 20);
textfontname.preferredSize = [200, 30]; textfontname.helpTip = "textfontname";
var Nfontname = win.add ('statictext', undefined, "Numberfontname");
Nfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 15);
var numberfontname = win.add("dropdownlist", undefined, "");
numberfontname.graphics.font = ScriptUI.newFont ("Arial", "Bold", 20);
numberfontname.preferredSize = [200, 30];numberfontname.helpTip = "Numberfontname";
btn = win.add('button', undefined, 'Change')
btn.preferredSize = [200, 35];
btn.onClick = function() {
}
win.show()