Setting the text without changing styling
- From: Ron Benditt <rbenditt@xxxxxxxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Fri, 17 Apr 2009 14:53:30 -0700
Is there a way to put a text string into an FTEditfield without
changing the font and font size that is already set up in the
FTEditfield? Right now I'm doing this:
FTEditfield.setText "ABC"
This changes all of the font settings - not just the text itself. To
correct things, I have to refer back to a saved font style and then
manually change the style myself after updating the text like this:
FTEditfield.setText "ABC"
FTEditfield.SelectAll
FTEditField.changeFont "Times New Roman"
FTEditField.changeSize 18
FTEditField.changeTextColor &cA0A0A0
FTEditField.DeselectAll
As you can see, there is a whole lot more stuff to do just to do a
simple text setting. Am I missing something with this? It seems to
me that just calling .setText should not wipe out the current text
style unless there are rtf commands in there that override this.
Also, if its going to wipe out the text style, what style does it use
as a replacement? It seems to me that it should use the style that is
defined as the .defaultFont, .defaultTextSize, and .defaultTextColor
but this does not seem to be the case.
Regards,
Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com
FTC Website: http://www.truenorthsoftware.com/formattedtextcontrol
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in
the subject field.
Other related posts: