Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: RTF Table function

by ikkon (Monk)
on Aug 29, 2007 at 18:37 UTC ( #635899=note: print w/ replies, xml ) Need Help??


in reply to RTF Table function

that is exactly the problem, thanks with the help of injunjoel we came up with this that worked well

my @tableProp5 = ( widths => [inches(3), inches(4)], #--> width of +each column align => 'l l', ); my @myText = ( [\'\fs20\b this', 'that'], [\'\fs20\b this', 'that'], [\'\fs20\b this', 'that'], [\'\fs20\b this', 'that'], ); RTFTable(\@tableProp5, 9, 7,\@myText); $fh->close(); sub RTFTable{ my @tableProps = @{$_[0]}; my $headerColor = $_[1]; my $bgColor = $_[2]; my @Text = @{$_[3]}; my $count = 0; my $oDecl5; foreach my $aref (@Text) { if($headerColor eq undef || $headerColor eq "" || $headerC +olor == 0 || $count == 0){ $oDecl5 = RTF::Writer::TableRowDecl->new(@tableProps); $oDecl5->add_bgcolors($headerColor); # Adds backgroun +d color using color hash $fh->row($oDecl5, @$aref); $count++; }else{ $oDecl5 = RTF::Writer::TableRowDecl->new(@tableProps); $oDecl5->add_bgcolors($bgColor); # Adds background co +lor using color hash $fh->row($oDecl5, @$aref); } } }
thanks for the help and pointing me in the right direction.


Comment on Re: RTF Table function
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://635899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-11-24 03:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (135 votes), past polls