There was once a plug-in for FM which returned the user's cursor x/y coordinates on the screen, but I haven't needed it for years, and don't know if it's still around.
I am unable to find any FM-native function that will allow for adjusting the position vertically due to the position in a list. (The horizontal can be returned with a combination of Screen Width and Window left postions + fixed object horizontal postion on the layout.) However, placing the new window's height next to the correct row is beyond me in a scrollable window of unknown list length.
Thanks Stephen! This is more of a nice-to-have than a must-have so I'm going to avoid plugins. Ultimately if there is no answer I'm going to be fine with that.
Right now I'm experimenting with multiplying the record number by the height of the body part and adding the result to the result of the FieldBounds function. It's working pretty well (if there are no summary body parts) but I haven't done any testing with a long list of records so this is far from a proven method.
put your text on the layout in a field. Make the field height 0 (or 1) and allow "entry". Click something to Go To Field and it should pop down (even in list view).
if you don't want "entry" (because the cursor will appear in this field...) then make a calculation of the field and display that.
I'm not sure I follow your method Beverly but fundamentally I'm trying to spawn a new window when the user clicks that field. I'm not just populating that one field, I'm forcing the user to make some other scripted choices as well so it really needs to be window rather than just a single field.
Everything works fine except that the new window pops up well north of the field they clicked on.
Yes. I figured you wanted another window. I just presented an alternative if want to use a field.
As you've discovered, you cannot get the "bounds" on the list view.
Sorry just putting out ideas. Ignore if it doesn't help.
-- sent from my iPhone4 --
There is a way to get the top and right coordinates of an active field, even in a list view, however it comes with baggage that may not suit your application. Look at GetLayoutObjectAttribute. The wrinkles are that:
• For the function to work, the text field has to be given an object name and you would use Get(ActiveLayoutObjectName), for example
GetLayoutObjectAttribute ( Get(ActiveLayoutObjectName) ;"bounds" ).
• If you need to do this over many fields it will be a lot of work.
• I think you would need to fire this with script triggers, as in my test the calc was refreshing unreliably.
I have pasted the GetayoutObjectAttribute bounds details below. Look it up in FileMaker Help.
I hope this helps.
Beatrice Beaubien, PhD
i2eye, Toronto, Canada
FileMaker Business Alliance
FileMaker 11 Certified Developer
Knowledge Translation Certified Professional