From: Jerry L. <jer...@gm...> - 2011-03-29 23:00:15
|
Hi, I am trying to convert by Tktable based OFX to CSV converter to a program which uses Tablelist and I seem to be doing something wrong. The program below will display what I want but the initial display only shows the first two columns, the other columns are present but I have to manually enlarge the window in order to display all of the columns... . If I put the 'pack' after I add the rows the app freezes when I try to resize the window... Regrettably I am getting rather long in the tooth and stuff is falling off the end of my memory queue at an every increasing rate.... I am using Apple's Tcl/Tk and it appears that Tablelist is version 4.10. What am I doing wrong... Jerry ************** #!/usr/bin/tclsh package require Tk package require tablelist tablelist::tablelist .t -columns { 0 date 0 amount right 0 tranid 0 source 0 memo 0 status 0 category } \ -stretch all -background white \ -showseparators 1 \ -stripebg lightgreen \ -listvariable listContent set tbl .t $tbl columnconfigure 0 -name date -editable yes -editwindow entry \ -sortmode dictionary $tbl columnconfigure 1 -name amount -editable yes -editwindow entry \ -sortmode dictionary $tbl columnconfigure 2 -name tranid -editable yes -editwindow entry \ -sortmode dictionary $tbl columnconfigure 3 -name source -editable yes -editwindow entry \ -sortmode dictionary $tbl columnconfigure 4 -name memo -editable yes -editwindow entry \ -sortmode dictionary $tbl columnconfigure 5 -name status -editable yes -editwindow entry \ -sortmode dictionary $tbl columnconfigure 6 -name category -editable yes -editwindow entry \ -sortmode dictionary pack .t -fill both -expand 1 -side top .t insert end {2011-03-25 -55.00 WITHD {Online Payment 10644630 To Mar} Mow * {Home Repair:Yard Work}} .t insert end {2011-03-25 -150.79 WITHD {Online Payment 10644157 To Int} {Dr Ko for Marijo} * Medical} .t insert end {2011-03-25 -7.78 WITHD {MEIJER INC 258 2013 LA R052639} Food * Groceries} update idletasks puts $listContent ******************* |
From: Williams T. <pha...@gm...> - 2011-03-30 03:37:14
|
Jerry, I'm not sure if anyone got back to you on this yet, but you need to add the following option to the tablelist configuration "-width 0" to automatically display all of the columns without resizing required. Trevor Williams Jerry LeVan wrote: > #!/usr/bin/tclsh > package require Tk > package require tablelist > > tablelist::tablelist .t -columns { 0 date > 0 amount right > 0 tranid > 0 source > 0 memo > 0 status > 0 category > } \ > -stretch all -background white \ > -showseparators 1 \ > -stripebg lightgreen \ > -listvariable listContent > > set tbl .t > $tbl columnconfigure 0 -name date -editable yes -editwindow entry \ > -sortmode dictionary > > $tbl columnconfigure 1 -name amount -editable yes -editwindow entry \ > -sortmode dictionary > > $tbl columnconfigure 2 -name tranid -editable yes -editwindow entry \ > -sortmode dictionary > > $tbl columnconfigure 3 -name source -editable yes -editwindow entry \ > -sortmode dictionary > > $tbl columnconfigure 4 -name memo -editable yes -editwindow entry \ > -sortmode dictionary > > $tbl columnconfigure 5 -name status -editable yes -editwindow entry \ > -sortmode dictionary > > $tbl columnconfigure 6 -name category -editable yes -editwindow entry \ > -sortmode dictionary > > pack .t -fill both -expand 1 -side top > > .t insert end {2011-03-25 -55.00 WITHD {Online Payment 10644630 To Mar} Mow * {Home Repair:Yard Work}} > .t insert end {2011-03-25 -150.79 WITHD {Online Payment 10644157 To Int} {Dr Ko for Marijo} * Medical} > .t insert end {2011-03-25 -7.78 WITHD {MEIJER INC 258 2013 LA R052639} Food * Groceries} > update idletasks > puts $listContent > |
From: Jerry L. <jer...@gm...> - 2011-03-30 12:09:10
|
On Mar 29, 2011, at 11:37 PM, Williams Trevor wrote: > Jerry, > > I'm not sure if anyone got back to you on this yet, but you need to add > the following option to the tablelist configuration "-width 0" to > automatically display all of the columns without resizing required. > > Trevor Williams > > Thanks Trevor, I guess I missed that option in the maze of possible options :( I was getting worried because I was getting application lockups when I manually resized the window about 20% of the time... Jerry > > Jerry LeVan wrote: >> #!/usr/bin/tclsh >> package require Tk >> package require tablelist >> >> tablelist::tablelist .t -columns { 0 date >> 0 amount right >> 0 tranid >> 0 source >> 0 memo >> 0 status >> 0 category >> } \ >> -stretch all -background white \ >> -showseparators 1 \ >> -stripebg lightgreen \ >> -listvariable listContent >> >> set tbl .t >> $tbl columnconfigure 0 -name date -editable yes -editwindow entry \ >> -sortmode dictionary >> >> $tbl columnconfigure 1 -name amount -editable yes -editwindow entry \ >> -sortmode dictionary >> >> $tbl columnconfigure 2 -name tranid -editable yes -editwindow entry \ >> -sortmode dictionary >> >> $tbl columnconfigure 3 -name source -editable yes -editwindow entry \ >> -sortmode dictionary >> >> $tbl columnconfigure 4 -name memo -editable yes -editwindow entry \ >> -sortmode dictionary >> >> $tbl columnconfigure 5 -name status -editable yes -editwindow entry \ >> -sortmode dictionary >> >> $tbl columnconfigure 6 -name category -editable yes -editwindow entry \ >> -sortmode dictionary >> >> pack .t -fill both -expand 1 -side top >> >> .t insert end {2011-03-25 -55.00 WITHD {Online Payment 10644630 To Mar} Mow * {Home Repair:Yard Work}} >> .t insert end {2011-03-25 -150.79 WITHD {Online Payment 10644157 To Int} {Dr Ko for Marijo} * Medical} >> .t insert end {2011-03-25 -7.78 WITHD {MEIJER INC 258 2013 LA R052639} Food * Groceries} >> update idletasks >> puts $listContent >> |