With the assistance of Support I have setup an global Auto-GUI rule to dynamically create radio buttons based on the text displayed on the screen after the input field. For example after an input field I have the following text
1=Option 1, 2=Option 2, 3=Option 3
The script below converts them to a set of radio buttons with the text Option 1, Option 2 and Option 3.
var fld = FIELD.nextField();
var oOptions = fld.getValue();
var aOptions = oOptions.split(",");
var ret = [];
var idx = 0;
aOptions.forEach(function(entry) {
var val = entry.split("=");
ret[idx]= {value: val[0].trim(), text: val[1]};
idx++;
}
);
ENV.returnValue = ret;
I now want to set the colour of the text to blue. I tried using the style option in the Auto GUI but this has no effect. I tried changing the JavaScript to use the font color intrinsic.
ret[idx]= {value: val[0].trim(), text: val[1].fontcolor("blue")};
Rather than the font color changing I get the HTML tags displayed.
<font color="blue">PDD</Font>
Has anyone had any experience changing the style of dynamically created controls?
Thanks in advance.
Best Regards,
Eugene
Set the style of dynamically generated radio buttons
Moderator: jeanmichel
-
Eugene.King
- Posts: 10
- Joined: 09 Sep 2019, 19:26
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Set the style of dynamically generated radio buttons
Hi Eugene,
Did you try to use "captionStyle"? This style affects to caption of the radio button. Best Regards,
Hidekazu Tanaka
Did you try to use "captionStyle"? This style affects to caption of the radio button. Best Regards,
Hidekazu Tanaka
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Set the style of dynamically generated radio buttons
Hi Eugene,
The screen shot should be something like below in v4.2.0.
The expected result is here:
HTH.
Best Regards,
Hidekazu Tanaka
The screen shot should be something like below in v4.2.0.
The expected result is here:
HTH.
Best Regards,
Hidekazu Tanaka
-
Eugene.King
- Posts: 10
- Joined: 09 Sep 2019, 19:26
Re: Set the style of dynamically generated radio buttons
Hi Hidekazu,
I don't seem to have the option for the caption style in the extension properties (see attached image Radio Button Properties).
I'm using aXes 4.2. I'm also using an AutoGUI rule to create the radio buttons. I would like to set the style on the rule rather than on every screen.
Best Regards,
Eugene
I don't seem to have the option for the caption style in the extension properties (see attached image Radio Button Properties).
I'm using aXes 4.2. I'm also using an AutoGUI rule to create the radio buttons. I would like to set the style on the rule rather than on every screen.
Best Regards,
Eugene
- Attachments
-
- Radio_Button_Properties.png (185.2 KiB) Viewed 15581 times
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Set the style of dynamically generated radio buttons
Hello Eugene,
You are selecting "Material Design" from Application->Styling->appStylesTheme property, I think.
"captionStyle" is the property for Basic and JQueryUI theme only.
Best Regards,
Jun Kato
You are selecting "Material Design" from Application->Styling->appStylesTheme property, I think.
"captionStyle" is the property for Basic and JQueryUI theme only.
Best Regards,
Jun Kato