Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Remove "in" units from X Coordinates

Avatar

03-10-2008

Does any know how to remove the "in" units from an x coordinate?

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

03-10-2008

Not sure I follow ....do you want to work in different units?

Avatar

03-10-2008

When I get the X coord for an object in script. Text1.x it returns 2in but i need to take that value (without the units "in") and add a value to it.



Also, I am having some difficuly getting the width value of a textbox that expands to fit.



I want to position a help button after a textbox. I want to know the position of the textbox and the width. So i can set the X value of the help button.



Thanks,

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

03-10-2008

I have an example of this on another computer that I cannot get to until next Tuesday....I will post the example then.

Avatar

04-10-2008

Sick.. I figured it out. Wrap the expandable text and help button in a subform and make the content Flowed - Western text.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

07-10-2008

That is not the way I would do it.

Here is some code that will give you the length of the field after rendering. You can change the units to any supported value at it will work fine. Note that this is javascript.



var oH = xfa.layout.w(txtDescription, "in");

this.w = oH + "in";



where txtDescription is the name of the field that you want to get the length of. This code wouldl be executed in the layout event of the object that you are trying to position.



Hope this helps

Avatar

07-10-2008

Would I be able to get the x/y coords as well by this approach?

xfa.layout.x(txtQuestion,"in");

xfa.layout.y(txtQuestion,"in");

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

07-10-2008

Yes..that woudl be the absolute positioning after layout (useful in a flowed form). Not the x and y at Design time like in a static form.