Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: Who can give an example of Tkx :: ttk__treeview to me? ( Object Style)

by bulk88 (Priest)
on Feb 01, 2014 at 05:12 UTC ( [id://1072938]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Who can give an example of Tkx :: ttk__treeview to me? ( Object Style)
in thread Who can give an example of Tkx :: ttk__treeview to me?

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;

Replies are listed 'Best First'.
Re^5: Who can give an example of Tkx :: ttk__treeview to me? ( Object Style)
by Anonymous Monk on Feb 01, 2014 at 07:54 UTC

    I have written Tkx, removed business logic from example.

    :D Not exactly an example of treeview for the OP :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1072938]
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-04-19 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found