Exportieren von GroupBox (in Bild)



  • Hallo Leute,

    kann mir jemand sagen wie man eine GroupBox oder vielmehr ihren Inhalt
    in eine bmp-Datei oder ein anderes Bildformat exportieren kann.
    Ich benutze eine Instrumenten-Komponente von TMS, die hat leider keine
    Exportmöglichkeit.

    Gruss myerscola



  • Graphics::TBitmap *bmp=new Graphics::TBitmap();
     bmp->Width=GroupBox->BoundsRect.Width();
     bmp->Height=GroupBox->BoundsRect.Height();
     bmp->Canvas->CopyRect(bmp->Canvas->ClipRect, this->Canvas,GroupBox->BoundsRect);
    
     //whatever
     // z.B.:
      Image1->Picture->Assign(bmp);
     //
     delete bmp;
    

    Das sollte tun.



  • danke für die schnelle Antwort -es klappt

    gruss myerscola


Anmelden zum Antworten