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

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

Recommended Posts

Posted

I have a button script that changes the size of a selection in a text field. 

This is it:

Insert Calculated Result [ TextSize ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get
( ActiveSelectionSize ) ) ; $size ) ] 

A problem with this is that if the selection begins with styled characters (bold, underlined, etc) then the entire resized area becomes styled. If there is at least 1 unstyled character before the first styled one, then all styled and unstyled characters remain as they were. What is missing from the calculation? 

Posted

I have tested this on my own and I am not sure if this is a bug or an intended behavior. The Insert Calculated Result[] script step behaves in this aspect the same as the Replace() function. The inserted text takes on the style of the text at insertion point (in addition to any style/s it may have on its own). Perhaps they (FMI) thought that would be helpful.

  • 3 weeks later...
Posted

I'm not sure what the reason would be for intending this behavior. It is clearly an annoying behavior. The only workaround is to insert an unstyled character in front of the selection, make the change then remove the extra character. 

This topic is 1943 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.