Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6262 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Is there a script step equivalent to the Control-Home key combination on the PC?

When the user tabs to a text field containing a large block of text, FileMaker places the cursor at the end of the block and the first lines are out of view at the top. Control-Home on the keyboard shifts the displayed text back to the top. I need to provide a on-screen button to do the same thing for easy mouse-based viewing. I've tried Set Selection [] with coordinates of 1 and 0. That moves the cursor to the first character, but doesn't shift the displayed portion upward, so the text cursor disappears.

I'm drawing a blank on how to accomplish this and any suggestions will be appreciated.

Thanks.

Posted

If you do a COMMIT RECORDS before your SET SELECTION that should do what you are looking for. Assuming that commiting the record then won't mess-you-up in other ways.

Posted

Thanks for the response.

I forgot to mention that the field is in a portal and the user may have tabbed down several rows. Commit Records/Requests causes the field to lose focus, the same as a SetField[].

Any other ideas?

Posted

I've noticed this bug back in version 7, and it's still around - even worse. You could try the following hack, but for some reason it won't work in version 9.

Set Selection [ Table::Textfield; Start Position: 1; End Position: 0 ]

Insert Text [ “¶” ]

Set Selection [ Table::Textfield; Start Position: 1; End Position: 1 ]

Clear [ ]

Posted

comment, thanks.

Your post gave me an idea to try something even simpler:

Set Selection [start Position: 1]

Insert []

It seems to work -- at least in the cases I've test so far. It operates on whatever field the cursor is in at the time.

Posted

Ah, of course. Didn't occur to me I could just leave the text box empty - thanks for that.

And I finally found a way that will work in version 9 too:

Set Selection [start Position: 1]

Insert []

Undo

You might want to add that to future-proof your solution.

This topic is 6262 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.