Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Text won't display in Perl/Tk

by PrimeLord (Pilgrim)
on Jan 11, 2005 at 19:48 UTC ( [id://421395]=perlquestion: print w/replies, xml ) Need Help??

PrimeLord has asked for the wisdom of the Perl Monks concerning the following question:

I recently created a standalone windows executeable with pp in the PAR package to run a little Perl/Tk GUI app. On my PC which has ActiveState installed the application runs perfectly both as the perl script and then as the standalone .exe file.

However when I sent the application to a buddy the Tk box displayed, but the text was all garbled. The text appeared to be various ASCII characters. I thought it was maybe a font issue so I forced the font int he boxes to be Times New Roman 10, but that didn't change anything. Everything else appeared to work properly. The radio buttons and the scroll box all showed up and the application produced the reports correctly when I told him which buttons to push. You just can't read any of the text.

I tried a few different pp build methods, but the last build was built with these options.

pp --gui -o app.exe -l Tk source.pl

Any suggestions on what might be causing the problem? Any help would be greatly appreciated. Thanks!

-Prime

Replies are listed 'Best First'.
Re: Text won't display in Perl/Tk
by teabag (Pilgrim) on Jan 11, 2005 at 20:18 UTC
    Hmm, a little code would help here.

    Are you using Tk::FontDialog?

    from the docs:

    CAVEAT
    Note that font names with whitespace like ``New century schoolbook'' or ``MS Sans Serif'' can cause problems when using in a -font option. The solution is to put the names in Tcl-like braces, like

    -font => "{New century schoolbook} 10"

    in your case:
    -font => "{Times New Roman} 10"

    kind regards,


    teabag
    Blessed is the end user who expects nothing, for he/she will not be disappointed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://421395]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-03-28 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found