91 |
return defined($self->attribute("y")) ? $self->attribute("y") : $self->lam_y; |
return defined($self->attribute("y")) ? $self->attribute("y") : $self->lam_y; |
92 |
} |
} |
93 |
|
|
94 |
|
sub max_length |
95 |
|
{ |
96 |
|
my $self = shift; |
97 |
|
my $max_length = shift; |
98 |
|
|
99 |
|
$self->attribute("max_length", $max_length) if defined ($max_length); |
100 |
|
return $self->attribute("max_length"); |
101 |
|
} |
102 |
|
|
103 |
sub width |
sub width |
104 |
{ |
{ |
105 |
my $self = shift; |
my $self = shift; |
106 |
my $width = shift; |
my $width = shift; |
107 |
|
|
108 |
return 0 if $self->hidden =~ /y/i; |
return 0 if $self->hidden =~ /y/i; |
109 |
|
my $max_length = $self->max_length; |
110 |
|
$width = $max_length+1 if defined($width) && defined($max_length) && $width > $max_length+1; |
111 |
$self->attribute("width", $width) if defined ($width); |
$self->attribute("width", $width) if defined ($width); |
112 |
return defined($self->attribute("width")) ? $self->attribute("width") : $self->lam_width; |
return defined($self->attribute("width")) ? $self->attribute("width") : $self->lam_width; |
113 |
} |
} |