Thanks a zillion!!!! Now I can have alternating colors instead producing a=
=20
better effect.
Jonathan Southwick
jso...@al...
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755
At 11/9/2001 02:39 PM, you wrote:
>At 08:18 2001-11-09 -0500, Jonathan Southwick wrote:
>>I know that if you specify the '-bold =3D> 1' option in creating a font=20
>>object and using that font in the RichEdit object creation that you can=20
>>get your text bolded in the RichEdit field. My question is this, is it=20
>>possible to go back and forth between bolded and unbolded text in a=20
>>Richedit field?
>
>Working code:
>
>=3Dhead2 podAddLine($line, $heading)
>
>Add the $line to the end of the POD text box, using the
>$heading level of emphasis.
>
>$heading -- 0 =3D=3D text, 1 =3D=3D H1, 2 =3D=3D H2
>
>Return 1 on success, else 0.
>
>=3Dcut
>sub podAddLine { my $self =3D shift; my $pkg =3D ref($self);
> my ($line, $heading) =3D @_;
>
> my @aFont =3D (
> -height =3D> $self->rhConfig()->{podFontSize},
> -name =3D> $self->rhConfig()->{podFontName},
> );
> my %hOn =3D (
> 1 =3D> [-color =3D> 0x000000, -bold =3D> 1, @aFont],
> 2 =3D> [-color =3D> 0x000000, -bold =3D> 1, @aFont],
> 0 =3D> [-color =3D> 0x000000, -bold =3D> 0, @aFont],
> );
> my $rePOD =3D $self->winMain()->rePOD();
>
> $rePOD->Select(999999,999999); #Stolen from the PM chatterbox
> $rePOD->SetCharFormat(@{$hOn{$heading}});
> $rePOD->ReplaceSel("$line\n",1);
>
> return(1);
> }
>
>
>/J
>
>------ ---- --- -- -- -- - - - - -
>Johan Lindstr=F6m Boss Casinos
>Sourcerer jo...@ba...
> http://www.bahnhof.se/~johanl/
>If the only tool you have is a hammer,
>everything tends to look
>like a nail
>
>
>_______________________________________________
>Perl-Win32-GUI-Users mailing list
>Per...@li...
>https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
|