Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Tkx not installing properly

by freedee15 (Initiate)
on May 12, 2019 at 18:15 UTC ( #1233662=note: print w/replies, xml ) Need Help??


in reply to Re: Tkx not installing properly
in thread Tkx not installing properly

Really, all I'm looking to do is to be able to use Ttk modules as opposed to Tk modules in Perl. Is there any easier way to do that?

Replies are listed 'Best First'.
Re^3: Tkx not installing properly
by chrstphrchvz (Scribe) on May 13, 2019 at 00:23 UTC

    I'm glad you asked! Yes, there might be.

    You can use Ttk widgets from any Tcl/Tk wrappers: Tkx, Tcl::Tk, Tcl::pTk, and even Tcl.pm by itself. However I think which one to use depends on what you're familiar with and whether you're working on an existing Perl/Tk program. I have more info on comparing the wrappers in an answer on StackOverflow. Those familiar with Perl/Tk might try Tcl::Tk and Tcl::pTk (disclaimer: I maintain this): Tcl::Tk is simpler and probably better for new projects not depending on any Perl/Tk extensions, while Tcl::pTk tries to work with existing Perl/Tk programs (they might not work on the first try, but I think the effort of getting them working in Tcl::pTk likely beats rewriting them in Tkx or Tcl syntax). For anyone not familiar with Perl/Tk, or familiar with Tcl/Tk or wrappers on other programming languages (e.g. Tkinter for Python), it might be better to stick with Tkx and follow the tutorials on TkDocs.com. All of these wrappers allow using pure Tcl syntax as well.

    For existing Perl/Tk programs, you might first give Tcl::pTk::Facelift and Tcl::pTk::TkHijack a try. (I have some notes on using Tcl::pTk::TkHijack in another PerlMonks thread.) If you become "committed" to using Tcl::pTk over Perl/Tk, then another option is prefixing common widget types with ttk (e.g. ttkButton, ttkLabel).

    However, I think there is a strong likelihood that the issue you've encountered here will affect the other Tcl/Tk wrappers. I sent an email to the perl-tcltk mailing list to inform others who might be able to help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1233662]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2019-12-07 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (160 votes). Check out past polls.

    Notices?