RVE Border Color

General TRichView support forum. Please post your questions here
Post Reply
smot22
Posts: 5
Joined: Thu Apr 06, 2006 11:16 am

RVE Border Color

Post by smot22 »

Hi

How can I change the RVE border color?
Is there any property to do so?
smot22
Posts: 5
Joined: Thu Apr 06, 2006 11:16 am

Post by smot22 »

*push*
Pieter E.
Posts: 834
Joined: Sun Aug 28, 2005 9:34 am

Post by Pieter E. »

Hi,

You could try this (C++):

Code: Select all

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  if( RichViewEdit1->Parent->InheritsFrom(__classid(TForm)))
        {
          RichViewEdit1->BorderStyle = bsNone;
          ((TForm *)RichViewEdit1->Parent)->Canvas->Pen->Color = clBlack;
          ((TForm *)RichViewEdit1->Parent)->Canvas->Rectangle(TRect(RichViewEdit1->Left - 1,
            RichViewEdit1->Top - 1, RichViewEdit1->Left + RichViewEdit1->Width + 1,
            RichViewEdit1->Top + RichViewEdit1->Height + 1));
        }
}
//---------------------------------------------------------------------------
Above source sets the 'BorderStyle' of the TRichViewEdit to 'None' and draws a black rectangle.

Good luck,

Pieter E.
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, border cannot be modified but can be hidden.
Post Reply