Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a Close/Done button to a listbox 1

Status
Not open for further replies.

WTHolmes

Technical User
Mar 22, 2007
18
0
0
US
Hi Folks,

I am creating a listbox as shown below. I would like to include a close or done button which will close the list box after it is viewed. Can you help me with this?

proc list_box {} {
listbox .l
pack .l -side top
.l insert 0 Cherry
.l insert 0 Green Apple
.l insert 0 Blueberry
}

Thanks,

WTHolmes
 
pack [button .lbc -text close -command {destroy .l}] -side top

_________________
Bob Rashkin
 
Need I say more, Bong, You Da Man!

Thanks,

WTHolmes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top