//---------------------------------------------------------------------------

#include <vcl.h>

#pragma hdrstop

#include "TestButton.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
// ValidCtrCheck is used to assure that the components created do not have
// any pure virtual functions.
//

static inline void ValidCtrCheck(TTestButton *)
{
    new TTestButton(NULL);
}
//---------------------------------------------------------------------------
__fastcall TTestButton::TTestButton(TComponent* Owner)
    : TButton(Owner)
{
    Image = new TImage(this);
    Image->Parent = this;
    Image->Center = true;
    Image->Top = 0;
    Image->Left = 0;
    Image->Picture->LoadFromFile("C:\\TestButton\\123.jpg");
}
//---------------------------------------------------------------------------
void __fastcall TTestButton::SetFSize(ButtonSize Value){
    switch(Value){
        case _10X20:
            Width = 10;
            Height = 20;
        break;
        case _30X40:
            Width = 30;
            Height = 40;
        break;
        case _50X60:
            Width = 50;
            Height = 60;
        break;

    }
    FSize = Value;
}
//---------------------------------------------------------------------------
namespace Testbutton
{
    void __fastcall PACKAGE Register()
    {
         TComponentClass classes[1] = {__classid(TTestButton)};
         RegisterComponents("Test", classes, 0);
    }
}
//---------------------------------------------------------------------------
 