bonngo Posted September 11, 2008 Posted September 11, 2008 Has anyone been able to use the Get(ActiveSelectionStart)function with FileMaker Pro 9.03? In theory I should be able to have two field (one being the calculation) and another a text field. When I click into the text field and highlight a selection of text I should have a number showing me my start point in the calculation field?
Raybaudi Posted September 11, 2008 Posted September 11, 2008 No, in theory you can't because the calculation field will calculate only when exit from the first field ( and then there is NO active selection ) But you can use ToolTip. BTW: which is the need for this ?
bonngo Posted September 11, 2008 Author Posted September 11, 2008 My initial problem is I have a scrolling text field that sometimes contains more data than the field size. The user needs to highlight a portion of the text to copy it to another field, but when that happens the scrolling field jumps back to the top and the user loses his place. My thought was that if I could capture the selection start through a script then I could also set the cursor back using the Set Selection script step to the correct possition.
Raybaudi Posted September 11, 2008 Posted September 11, 2008 No need of that calculation field. You'll need to create a button with only this step: Set field [ anotherField ; Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ] The user will select a text in the first field ( or even in another ) and press the button; the first field remains in focus where it was ( no more jumps back to the top ). If you wish to copy more than a portion of the first field into the second one, change the step to: Set field [ anotherField ; Trim ( anotherField & " " & Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ) ]
bonngo Posted September 11, 2008 Author Posted September 11, 2008 THANK YOU! THANK YOU! THANK YOU! This is exactly what I needed!
Recommended Posts
This topic is 5977 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 accountSign in
Already have an account? Sign in here.
Sign In Now