on 02-28-2012 4:29 PM
Hello,
i would like to modify the "thickness"- of a edge (textfield) by scripting.
But each edge separately and not all at once.
i am using this code for all edges
$.border.edge.thickness = "1mm"
But how is the code for changing the right edge?
I tried this
$.border.edge(2).thickness = "1mm"
or this
$.border.edge[2].thickness = "1mm"
but it didnt worked.
the xml code for changing each edge separately is:
<border>
<edge presence="hidden" thickness="0.2mm">
<color value="51,153,102"/>
</edge>
<edge presence="hidden" thickness="0.3mm">
<color value="255,255,0"/>
</edge>
<edge presence="hidden" stroke="dashDot" thickness="0.1mm">
<color value="0,255,255"/>
</edge>
<edge presence="hidden" thickness="2mm"/>
but how can i modifiy this via scripting
Thank you
Regards
Gregor
Hi Gregor
This line is actually correct in FormCalc: $.border.edge[2].thickness = "1mm";
You might have used the wrong event in case of static/print forms or in the case of an interactive PDF form it might not be a dynamic interactive PDF form. Background: the script line modifies the layout so it needs either done early enough in the rendering process or requires an update of the rendering.
Cheers,
Juergen,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Juergen,
i am using the ":ready:layout" Event and it's a static Print form, so no interaction on the form itselfs.
.
If am using
$.border.edge.thickness
it works for all edges.
if i changed the each edge manually in the designer and then using
the script
$.border.edge.thickness
it changes only the upper edge
further scriptlines like
$.border.edge[1].thickness = "2mm"
$.border.edge[2].thickness = "3mm"
$.border.edge[3].thickness = "4mm"
are ignored.
i also tried the "form:ready" and the "initialize" event,
for the upper edge it works, but not for the rest
Regards
Gregor
Hi Gregor,
This is strange. Since I do not have access to an SAP System at the moment I was only able to test this in Designer. I used Designer 8.2, NW 7.0 EHP2.
I used the preview mode (Print Form, static PDF Form) to see if the script is working and it does. For this scenario all scripting lines work accordingly to your expectations.
Using PDF preview can help identifying issues but there still might be problems even if the PDF works fine since it is not 100% the same code that is used for rendering PDFs and print output.
Juergen
Hello,
I tried the script below on a text field and it worked fine. I had written this in the Initialize event of the field.
$.border.edge[0].thickness = "6mm"
$.border.edge[1].thickness = "2mm"
$.border.edge[2].thickness = "3mm"
$.border.edge[3].thickness = "4mm"
Please note that the edge count starts from zero "[0]".
Regards,
Omkar Mirvankar.
At first i thought, maybe the problem is that the textfield ist actually a tablecell
but the problem is same with new created stand alone textfield.
I will try an updated version of the designer.
currently i am using version 8.01......
may this the problem.
i will report if this will solve the problem
thanks for yours suggestions
regards
Gregor
Hello,
I know ist an old thread, but I'm currently facing the same Problem, that it doesn't work to set each edge separately via FormCalc Scripting. When I use
$.border.edge.thickness = "2mm"
it works fine for all four edges of a textfield, but if I want to set the thickness of one edge separately with
$.border.edge[0].thickness = "2mm"
it still draws the border around all four edges
I tried it as well in different Events (initialize, docReady, ...)
Does anyone has further experience with this issue?
Any help would be appreciated
Regards,
Roman
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.