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

Automated Widget Binding

Status
Not open for further replies.

hamilton123

Technical User
Jun 19, 2007
3
0
0
AT
I am using Perl together with a Tcl GUI interface (use Tcl::Tk). I want to bind a lot of widgets (checkbuttons) that all go by the same statement:

my $widgetVariable;
my $widgetName=$windowName->widget("widgetName");
$widgetName->configure(-variable=>\$widgetVariable);

This binds the widget $widgetName and assigns the variable $widgetVariable. Given an array of widget names (widgetName1, widgetName2,...), how can I
1. automatically declare the corresponding variables
2. automatically bind the widgets
3. automatically configure the widgets
if they all have the above structure?

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top