• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

TextFont not working

I am trying to use the textfont function to change the font in a dialog box.

I have tried Courier, Courier New, Courier New (TrueType) and COUR.TTF and nothing works.
TextFont("Balance for this Grant: "&$Report&¶&¶&"  Total = "&FormatNumberasText($TotalBalance;"$";",";".";2);"Courier New")

Open in new window

0
dspace
Asked:
dspace
  • 7
  • 7
2 Solutions
 
jvaldesCommented:
is $Report text? Remember all items should be text
0
 
dspaceAuthor Commented:
Yes, $Report starts as "" and I add to it each time through a loop.
0
 
lesouefCommented:
missing double quote after $report, be it text or not, it is a variable, treat it as a field.
which gives:
TextFont("Balance for this Grant: " & $Report & "¶¶  Total =  " & .....
so the font name is not the pb, it works the way it is.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
lesouefCommented:
also FormatNumberasText must be a custom function, otherwise that does not exist, just in case...
0
 
dspaceAuthor Commented:
That doesn't seem to be it.  

Now I've tried evaluating textfont("alphas: 0123456789";"Courier New")  in the data viewer and it still does nothing.  I've also tried it with other fonts such as Tahoma and Times New Roman, also with no luck.
0
 
dspaceAuthor Commented:
In fact, now that I've started playing with it in Data Viewer, I can't get it to work for either text strings or fields.  Since I have to believe that it actually does work, I'm guessing that I'm not providing the correct name for the font.

I've tried:

Courier
Courier New
Courier New Bold
Tahoma
Times New Roman
0
 
lesouefCommented:
are you /win or osX ? I can post a file which works on the same machine (I have both) 'Courier New' is OK... normally!
0
 
dspaceAuthor Commented:
I've tried it on:

Win XP SP3
and OSX 10.5.6

FM9 and FM10
0
 
lesouefCommented:
take my example here, tested under windows and mac:
http://pagetruck.com/uploads/13kx3tq5JdIsTkXYzmaXAA23dUw5DhOx/textfont.fp7
and let me know.
0
 
dspaceAuthor Commented:
I get this message trying to access that link:

The requested URL /uploads/13kx3tq5JdIsTkXYzmaXAA23dUw5DhOx/textfont.fp7 was not found on this server.
0
 
lesouefCommented:
I thought you had taken it already, I deleted it!
a new one then
http://prd524.inkternet.net/pagetruck/uploads/pLwRYOagU0afsReUhuxGfrqTHfa1YHBj/textfont.fp7
0
 
dspaceAuthor Commented:
Thanks.  It works fine using data fields, but as soon as I try to use it in an expression, no luck.

I opened the data viewer and entered:

textfont(textfont::text_ref;"Segoe UI")

(or any other font name) and if just returned the default font.  I guess it just doesn't work in expressions.

Thanks for all your time and effort.
0
 
lesouefCommented:
it does, but the data viewer is not supposed to be "styled", is it? does it show colours for instance, or point size?
0
 
dspaceAuthor Commented:
I didn't try that, but if you're asking, I'm sure it doesn't.  I'm guessing that't the same problem with trying to assign a style to text in a Custom Dialog.
0
 
lesouefCommented:
yes, only a layout is supposed to interprete the styles, otherwise there are ignored.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now