Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://635899]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-02-24 22:37 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (311 votes). Check out past polls.