Entry widget -textvariable option 
Author Message
 Entry widget -textvariable option

Is there a way to set the textvariable option of an entry widget to a
member of an associative array. For example if I had the %elements assoc
array could I somehow set the entry widget to always update the value
of $elements{'element1'} instead of just using a regular variable?

                                                        -Todd

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Todd Huss

                       www: http://www.*-*-*.com/ ~huss
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~



Sat, 27 Jun 1998 03:00:00 GMT  
 Entry widget -textvariable option

Quote:
>Is there a way to set the textvariable option of an entry widget to a
>member of an associative array. For example if I had the %elements assoc
>array could I somehow set the entry widget to always update the value
>of $elements{'element1'} instead of just using a regular variable?

$entry->configure(-textvariable=>\$elements{'element1'});

Will work.

$entry->configure(-textvariable=>\$elemref->{'element1'});

Is nice if $elemref is a reference to an associative array.  

                                                                EJB



Sun, 28 Jun 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Entry widget and -textvariable configuration option..

2. Label widget -textvariable option

3. Multiple option type entry widget?

4. -textvariable option in NumEntryPlain.pm

5. why dereference and then pass reference again on -textvariable option

6. change background color on a widget when the textvariable changes

7. Implementing a -textvariable in a custom widget

8. Adding new options to an entry

9. Browse entry color option.

10. Info on widgets and options

11. $widget->configure to read options

12. Text Widget Index Options

 

 
Powered by phpBB® Forum Software