I have written Tkx, removed business logic from example.
#!/usr/bin/perl -w BEGIN { $ENV{PERL_TCL_DLL} = 'C:\Program Files\Tcl\bin\tcl85t.dll'; } use Tkx; #print Tkx::package_require( 'platform'); #print "\n"; #print Tkx::platform__identify(); # print "\n"; #print Tkx::info_loaded(); # print "\n"; #print Tkx::info_nameofexecutable(); #Tcl::DL_PATH my $mw = Tkx::widget->new("."); $mw->new_button( -text => "Run", -command => sub { LXS::EnumState(2000); $mw->g_destroy; }, )->g_pack; Tkx::MainLoop();
# GUIBuildertkx.pl -- # # UI generated by GUI Builder Build 146 on ################REMOVED#### +################## from: ################REMOVED###################### # This file is auto-generated. Only the code within # '# BEGIN USER CODE' # '# END USER CODE' # and code inside the callback subroutines will be round-tripped. # The subroutine name 'ui' is reserved. # # Declare the package for this dialog package GUIBuildertkx; BEGIN { $ENV{PERL_TCL_DLL} = 'C:\Program Files\Tcl\bin\tcl85t.dll'; } # Locate this script so we can load the ui module use FindBin qw($RealBin); use lib $RealBin; use GUIBuildertkx_ui; ################REMOVED###################### use String::Escape qw( backslash ); ################REMOVED###################### sub ################REMOVED###################### { my ($result, $error) = ($_[1], $_[2]); if($result){ if(################REMOVED######################) { ################REMOVED###################### Tkx::update('idletasks'); return 1; } else{ ################REMOVED###################### closed($_[0]); ################REMOVED###################### } sub closed { ################REMOVED###################### $_button_1->configure('-text', 'Start'); } sub InetCB{ ################REMOVED###################### $CodeBoxStr = ################REMOVED###################### if( ################REMOVED######################) { my ($resultcb, $error) = ################REMOVED########## +############ $Info1BoxStr = $resultcb; $Info2BoxStr = $error; } else { $Info1BoxStr = backslash(################REMOVED########## +############); $Info2BoxStr = ''; } Tkx::update('idletasks'); } ################REMOVED###################### $CodeBoxStr = $statuscode; $Info1BoxStr = $info1; $Info2BoxStr = $info2; $FilesizeBoxStr = length(################REMOVED################## +####); Tkx::update('idletasks'); ################REMOVED###################### } # END USER CODE # BEGIN CALLBACK CODE # ONLY EDIT CODE WITHIN THE SUB COMMANDS. # _button_1_command -- # # Callback to handle $_button_1 widget option -command # sub _button_1_command { print Dumper \@_; if($_button_1->cget('-text') eq "Start") { $_button_1->configure('-text', 'Stop'); $CodeBoxStr = ''; $Info1BoxStr = ''; $Info2BoxStr = ''; $FilesizeBoxStr = ''; Tkx::update('idletasks'); ################REMOVED###################### {'Tcl' => [\&InetCB, Tkx::i::inter +p() ]} ################REMOVED###################### } # _checkbutton_1_command -- # # Callback to handle $_checkbutton_1 widget option -command # sub _checkbutton_1_command {} # codeBox_invalidcommand -- # # Callback to handle $codeBox widget option -invalidcommand # sub codeBox_invalidcommand {} # codeBox_validatecommand -- # # Callback to handle $codeBox widget option -validatecommand # sub codeBox_validatecommand {} # codeBox_xscrollcommand -- # # Callback to handle $codeBox widget option -xscrollcommand # sub codeBox_xscrollcommand {} # filesizeBox_invalidcommand -- # # Callback to handle $filesizeBox widget option -invalidcommand # sub filesizeBox_invalidcommand {} # filesizeBox_validatecommand -- # # Callback to handle $filesizeBox widget option -validatecommand # sub filesizeBox_validatecommand {} # filesizeBox_xscrollcommand -- # # Callback to handle $filesizeBox widget option -xscrollcommand # sub filesizeBox_xscrollcommand {} # info1Box_invalidcommand -- # # Callback to handle $info1Box widget option -invalidcommand # sub info1Box_invalidcommand {} # info1Box_validatecommand -- # # Callback to handle $info1Box widget option -validatecommand # sub info1Box_validatecommand {} # info1Box_xscrollcommand -- # # Callback to handle $info1Box widget option -xscrollcommand # sub info1Box_xscrollcommand {} # info2Box_invalidcommand -- # # Callback to handle $info2Box widget option -invalidcommand # sub info2Box_invalidcommand {} # info2Box_validatecommand -- # # Callback to handle $info2Box widget option -validatecommand # sub info2Box_validatecommand {} # info2Box_xscrollcommand -- # # Callback to handle $info2Box widget option -xscrollcommand # sub info2Box_xscrollcommand {} # END CALLBACK CODE # Standalone Code Initialization - DO NOT EDIT # GUIBuildertkx::userinit() if defined &GUIBuildertkx::userinit; our($top) = Tkx::widget->new('.'); $top->g_wm_title('GUIBuildertkx'); GUIBuildertkx::ui($top); GUIBuildertkx::run() if defined &GUIBuildertkx::run; Tkx::MainLoop(); 1;

In reply to Re^4: Who can give an example of Tkx :: ttk__treeview to me? ( Object Style) by bulk88
in thread Who can give an example of Tkx :: ttk__treeview to me? by yyqdian

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.