Re: tablelist: embed abutton in cells
- From: "luckygiurato@xxxxxxxxx" <luckygiurato@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 02:00:58 -0800 (PST)
Thank you for the reply.
Before writing my code, I take a look to your demo code and to the
documentation.
I copied part your code.
This is a frame of "my" code, where I insert data extracted from the
database in the tablelist:
for { set i 0 } { $i < $list_dimesion } { incr i } {
set item [ lindex $my_list $i ]
set item [ linsert $item 0 "" ]
$tbl insert end $item
$tbl cellconfigure $i,0 -window createButton
}
proc createButton {tbl row col w} {
button $w -text "edit $row" -command [ puts "ROW: $row" ]
}
When I run the script, I see the table with data but:
- I can't see row number in botton text (-text option)
- when I press the button, I can't view the string on stdout
Have you any suggestion?
Can you tell me where is the mistake?
Thank you,
Luca
Good evening,
I've a problem writing my application.
I'd like to use a tablelist.
I'm reading data from database and I visualize them on a table.
This works fine.
Now I'd like to embed a button in the cells of the first tablelist
column, to perform an action.
Buttons are visible but the associated action ("-command") isn't
executed.
Can someone help me?
Thank you
Without knowing how you are creating and embedding the buttons, it is
hard to tell what's wrong with your code. Take a look at the demo script
"embeddedWindows.tcl", which is also discussed in detail in the
Tablelist Programmer's Guide. This script uses buttons embedded in one
of the columns of a tablelist widget, and the buttons do behave as expected.
--
Csaba Nemethi http://www.nemethi.de mailto:csaba.neme...@xxxxxxxxxxx
.
- Follow-Ups:
- Re: tablelist: embed abutton in cells
- From: Bryan Oakley
- Re: tablelist: embed abutton in cells
- References:
- tablelist: embed abutton in cells
- From: luckygiurato@xxxxxxxxx
- Re: tablelist: embed abutton in cells
- From: Csaba Nemethi
- tablelist: embed abutton in cells
- Prev by Date: Re: WIN A NEW CAR
- Next by Date: Re: Passing literal strings to Tcl_Eval.
- Previous by thread: Re: tablelist: embed abutton in cells
- Next by thread: Re: tablelist: embed abutton in cells
- Index(es):