00001 lappend auto_path [file join [pwd] tkcon] 00002 lappend auto_path [file join [pwd] ctext] 00003 00004 package require tkcon 00005 package require ctext 00006 00007 source "edit.tcl" 00008 source "select.tcl" 00009 source "utils.tcl" 00010 00011 ttk::frame .f 00012 ctext .f.t -xscrollcommand [list .f.hb set] -yscrollcommand [list .f.vb set] 00013 ttk::scrollbar .f.vb -orient vertical -command [list .f.t yview] 00014 ttk::scrollbar .f.hb -orient horizontal -command [list .f.t xview] 00015 00016 select::add .f.t .f.sb 00017 00018 grid rowconfigure .f 0 -weight 1 00019 grid columnconfigure .f 0 -weight 1 00020 grid .f.t -row 0 -column 0 -sticky news 00021 grid .f.vb -row 0 -column 1 -sticky ns 00022 grid .f.hb -row 1 -column 0 -sticky ew 00023 grid .f.sb -row 0 -column 2 -sticky ns -rowspan 2 00024 00025 grid remove .f.sb 00026 00027 pack .f -fill both -expand yes 00028 00029 bind all <Control-m> [list select::set_select_mode .f.t.t 1] 00030 00031 .f.t insert end \ 00032 "This is some test text to use for selections. We are going to give\neverything a run for its money. What do you think? I think that\nthis feature is going to rule!" 00033 00034 ttk::style theme use clam 00035 00036 tkcon show