@Nesa Nurani as you can see in the screenshot below,
depending on the percentage selected, a text is displayed in the text Field. But,
I'd like the length and width to adjust automatically (if possible) according to the predefined text to be displayed.

here's the code I'm currently using to display the information.
var rb = this.getField("Group1").valueAsString;
// 100%
if(rb === "Yes"){
event.target.display = display.visible;
event.value = "the equipment can be used ";
event.target.fillColor = color.green;}
// 50%
else if(rb === "Yes1"){
event.target.display = display.visible;
event.value = "The product can be used safely (provided that the above defects and observations are taken into account)";
event.target.fillColor = color.yellow;}
// 0%
else if(rb === "Yes2"){
event.target.display = display.visible;
event.value = "the equipment must be repaired";
event.target.fillColor = color.red;}
else {
event.target.display = display.hidden;}
Since you have predefined text it's possible using rect, it's best to set up field height/width manually for each text and get rect for each text, then you can use that in your script to set height/width for each text.
To get rect of a field, open console CTRL+J (on Windows) and let's say field name is "Text1" paste this into console and press enter:
this.getField("Text1").rect;
you should get a bunch of numbers now, those are rect points for your current field position, copy and paste those numbers somewhere for now and repeat process for all 3 texts.
Now use those numbers in your script like this:
var rb = this.getField("Group1").valueAsString;
var rYes = [235.45343017578125,742.2980346679688,420.0910949707031,719.7980346679688];
// 100%
if(rb === "Yes"){
event.target.display = display.visible;
event.value = "the equipment can be used ";
event.target.fillColor = color.green;
event.target.rect = rYes;}