home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / auto / Tk / Widget / grid.al < prev    next >
Encoding:
Text File  |  1997-08-10  |  569 b   |  24 lines

  1. # NOTE: Derived from blib\lib\Tk\Widget.pm.  Changes made here will be lost.
  2. package Tk::Widget;
  3.  
  4. sub grid
  5. {
  6.  local $SIG{'__DIE__'} = \&Carp::croak;
  7.  my $w = shift;
  8.  if (@_ && $_[0] =~ /^(?:bbox|columnconfigure|configure|forget|info|location|propagate|rowconfigure|size|slaves)$/x)
  9.   {
  10.    my $opt = shift;
  11.    Tk::grid($opt,$w,@_);
  12.   }
  13.  else
  14.   {
  15.    # Two things going on here:
  16.    # 1. Add configure on the front so that we can drop leading '-' 
  17.    Tk::grid('configure',$w,@_);
  18.    # 2. Return the widget rather than nothing
  19.    return $w;
  20.   }
  21. }
  22.  
  23. 1;
  24.