trichview.com

trichview.support




Bug? Spacingline


Return to index


Author

Message

dekavita

Posted: 06/17/2004 2:54:39


Execution of a "RichView1->RVData->PaintTo" may vanish a Cell's Spacingline.

some time.( change width ... )

this is bug?




-- C++Builder Source Code --

complete source code:


  TRVTableItemInfo* table =

    new TRVTableItemInfo(10,10,RichView->RVData);

  table->BorderWidth = 0;

  table->CellBorderWidth = 0;

  table->CellHSpacing = 1;

  table->CellVSpacing = 1;

  table->BorderLightColor = clBlack;

  table->Color = clBlack;

  table->BorderColor = clBlack;

  table->BorderLightColor = clBlack;

  table->CellBorderColor = clBlack;

  table->CellBorderLightColor = clBlack;

  for( int loopy = 0; loopy < 10; loopy++ ){

    for( int loopx = 0; loopx < 10; loopx++ ){

      table->Cells[loopy][loopx]->Clear();

      table->Cells[loopy][loopx]->Color = clWhite;

      table->Cells[loopy][loopx]->AddNL(

                  String(loopy * 100 + loopx), 0, 0 );

    }

  }

  RichView->AddItem("", table);

  RichView->Format();


  RichView->HScrollPos = 0;

  RichView->VScrollPos = 0;

  RichView->Deselect();

  RichView->Invalidate();

  int Width  = RichView->RVData->DocumentWidth

     + RichView->LeftMargin + RichView->RightMargin;

  int Height = RichView->RVData->DocumentHeight

     + RichView->TopMargin + RichView->BottomMargin;


  TMetafile* wmf = new TMetafile;

  wmf->Width  = Width;

  wmf->Height = Height;

  Image2->Picture->Bitmap->Width = Width;

  Image2->Picture->Bitmap->Height = Height;

  Image2->Width = Width;

  Image2->Height = Height;


  TMetafileCanvas *pCanvas = new TMetafileCanvas(wmf, 0);

  pCanvas->Brush->Color = clWindow;

  pCanvas->FillRect(Rect(0,0,Width,Height));

  RichView->RVData->PaintTo(pCanvas,

       Rect(0,0,0xFFFFFFF,0xFFFFFFF));

  delete pCanvas;

  Image2->Picture->Graphic = wmf;

  delete wmf;





Powered by ABC Amber Outlook Express Converter