Hi there,
in a click-event I would like to change the height of all checkboxes that lie in the same horizontal row.
As it is a flowed layout some checkboxes may be in the next row - those I do not want to change.
My question is therefore: How can I find out the y-coordinate in a flowed layout?
With that information I would find my other objects.
(this.y delivers "0in" of course in a flowed layout.)
I do hope anyone has a good idea for that!
Uli
Solved! Go to Solution.
Views
Replies
Total Likes
You may want to try xfa.layout.y("objectname", "units you want returned ....default is points"). The same format applies for x and h which you may need later on.
Paul
Views
Replies
Total Likes
For increasing the height why do you need Y coordinate? The Y coordinate values are disabled in Flowed Layout. They are available in Position layout.
May be if you can eloborate what you are trying to achieve with Y coordinate then there might be an other way to do it..
Thanks
Srini
Views
Replies
Total Likes
Oh, apparently I failed to make my point clear.
Consider this example:
[ ] Checkbox1 [ ] Checkbox2 [ ] Checkbox3
[ ] Checkbox4
Whenever I click on one of those checkboxes I would like to change the height of all checkboxes in the same row (this.h = ...)
[Why this is necessary is too complicated to explain. These are forms that are part of fairly big environment with very specific reader add-ons .....]
Thus: If I click on checkbox2 I would like to find the checkboxes with the same vertical position (in this case: checkbox1, checkbox2 and checkbox3) to change their heights.
As it is a flowed layout checkbox4 has slipped over onto the next row. It is vertically further down in the current layout. Therefore I do not want to change its height.
What I need, is not really the y-attribute of the checkbox, but the vertical position in the layout. I just cannot find an attribute that delivers this information.
Does this make it clear?
Views
Replies
Total Likes
You may want to try xfa.layout.y("objectname", "units you want returned ....default is points"). The same format applies for x and h which you may need later on.
Paul
Views
Replies
Total Likes
Paul,
that looked like a promising hint! Thank you.
I tried
xfa.host.messageBox ("y: " + xfa.layout.y(MYCHECKBOX, "in"));
Strange thing is, that I keep getting "-1" as result.
Views
Replies
Total Likes
I just stepped into the wrong event. In layoutReady the result is
always "0"
Views
Replies
Total Likes
It is 0 because it is relative to the subform location ...if you try the x, or h you will get a positive value.... I think. I am getting 0 as well but if I try an object on a positioned subform I get a value based on the location of the subform. I woudl think that if you try the object n teh 2nd row you should get a different value (assuming they are in the same subform).
Paul
Paul,
while you were typing your reply I did some experiments and came to the same conlusion. Indeed, that's it! It works:
xfa.layout.y(this.parent, "in") does the trick!
Thanks a lot!!!
Uli
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies