Jump to content

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

Recommended Posts

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? 

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 3 weeks later...

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. 

Link to post
Share on other sites

This topic is 435 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
  • Similar Content

    • By Binu Alexander
      I need a layout with larger number of text fields which may have long words .. currently words are being split randomly and overflowing into new lines ..    eg .. for the word 'accordingly';   'accordingl' comes on the first line and 'ly' comes on the second line. Is there a way that filemaker can hyphenate large words and insert breaks so that  it breaks in a more clean manner ?
       
    • By Asu
      Hello FM Mavens, 
      I would like to be able to change an attribute (happens to be the size) of a selection in a text window with a script. (Basically, as if moving the size selector from the Formatting Bar into a button on a layout).
      I created a script that cuts the selection, puts it in another text field, makes the change, cuts it out and goes back to the original field but by then the insertion point is gone. I can manually paste it back of course.  I wonder if there is a way to remember the insertion point somehow and make it a so the paste step uses it. 
      Thanks
      Asu
       
    • By salim
      Hi. 
      I want to change the default title bar of filemaker pro, i know about kiosk mode, is there a better way to achive this without forcing my application to go full screen..?
    • By Trinity32244
      I am new to using themes and styles.  I have chosen the onyx theme for my new project.  My issue I am having is for tab controls I put in the layout are not formatting when I change object attributes.  I have set fill and line to no fill and no lines yet it still shows up with borders and a bar behind the tab selection area.  I use transparent tab panels for a lot of user interface objectives and have wasted hours trying to figure out why it won't change when I make them in the inspector bar
       
        
    • By Kent Searight
      Hi all,
       
      I'm using a single CSS theme for all layouts in a given file. I'd like to know if there's a quick way to identify any styles in that theme that aren't being used anywhere in the file. 
       
      Thanks in advance!
       
      -Kent
  • Who Viewed the Topic

    1 member has viewed this topic:
    Quito 

×
×
  • Create New...

Important Information

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