1 Reply Latest reply on Jan 9, 2014 8:09 AM by philmodjunk

    Replacing field font and font size without replacing styles

    FredLee

      Title

      Replacing field font and font size without replacing styles

      Post

           I've been trying to resolve an issue we have with formatting fields: We have users inputting data into fields using a variety of fonts, font sizes and styles.

           I am aware that (a) you can set a default font for the application, (b) you can set a default font and size for each field in a database, and (c) you can create a function for each field which removes all formatting for a field and returns the entry to the default font and size specified for that field. What I can't seem to do is remove the font and font size but leave the styles applied to parts of the entry in place.

           When I create a function to remove font "&" remove font size, I can cut and past the text in the field, but it repeats the text entered (since both "TextSizeRemove" and "TextFontRemove" have the field name in their calculation. I have tried the function contained in this site as: "TextSize( TextFont( TextColor( MyTable::MyText; RGB( 0 ; 125 ; 125 ) ); "Courier" ) ; 12) returns the text contained in MyTable::MyText formatted as 12pt. green text with the Courier font." but, contrary to what it says, that function changes only the font size, not the font. I have also tried using "self" instead of the field name, with results as above. If I create a function "TextFormatRemove" it does return the text entered to the default font and size for that field, but makes the subsequent application of styles to any part of that text impossible.

           If anyone can tell me how to accomplish changing the existing font and font size for text entered in a field, but not styles applied, to an entry in a field without selecting the text and going to the text formatting menu I would really appreciate it.