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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add Combo Box in my Application

Status
Not open for further replies.

SmallProgram

Programmer
Feb 6, 2002
42
IN
Hello everybody there,
Is there any way to add a combo box or its equalivent in a Tcl/Tk application.If yes please suggest me the answer. Iam really waiting for the answer.
Thanks in advance.
SriHariPriya. Programmer,Amatuer
 
use this one maybe:

use Tk::BrowseEntry;
$b = $frame->BrowseEntry(-label => "Label", -variable => $var);
$b->insert("end", "opt1");
$b->insert("end", "opt2");
$b->insert("end", "opt3");
...
$b->pack;
...
....
 
Once again, it would probably be best to note that matrix187's solution is for Perl/Tk, not Tcl/Tk. I certainly don't want to downplay his contributions to the group, but most of the discussion on this board involves Tcl and its extensions, whereas Perl/Tk is discussed more on the Perl forum.

As to SriHariPriya's question, there is no native Tcl/Tk combobox at this time. To add a combobox to your application, you'll need to use a Tcl extension. You've actually got a variety of choices, as many Tcl megawidget packages implement their own versions of a combobox. You can get pointers to these at the Tcl'ers Wiki ( specifically the page
Of the ones listed, I would probably recommend the ones provided by Bwidgets ( or the one implemented by Bryan Oakley ( as they are pure-Tcl extensions (no compiling required) and have no other dependencies. - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top