First commit 25/07/1999
This commit is contained in:
48
ElasticForm (building)/ElasticForm.cpp
Normal file
48
ElasticForm (building)/ElasticForm.cpp
Normal file
@ -0,0 +1,48 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ElasticForm.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(TElasticForm *)
|
||||
{
|
||||
new TElasticForm(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TElasticForm::TElasticForm(TComponent* Owner)
|
||||
: TControl(Owner)
|
||||
{
|
||||
nOwner = Owner;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Elasticform
|
||||
{
|
||||
void __fastcall PACKAGE Register()
|
||||
{
|
||||
TComponentClass classes[1] = {__classid(TElasticForm)};
|
||||
RegisterComponents("JD soft.", classes, 0);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall ResizeALL(void)
|
||||
{
|
||||
int i;
|
||||
// Nos damos un vueltazo por todos los componectes visibles del formulario
|
||||
for ( i=0; i<nOwner->ComponentCount; i ++ )
|
||||
{
|
||||
if ( nOwner->Components[i]->ClassNameIs( "TButton" ) )
|
||||
{
|
||||
//cast the component to a TButton *
|
||||
button = (TButton *)(nOwner->Components[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
22
ElasticForm (building)/ElasticForm.h
Normal file
22
ElasticForm (building)/ElasticForm.h
Normal file
@ -0,0 +1,22 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef ElasticFormH
|
||||
#define ElasticFormH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <SysUtils.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Forms.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class PACKAGE TElasticForm : public TControl
|
||||
{
|
||||
private:
|
||||
TComponent * nOwner;
|
||||
protected:
|
||||
public:
|
||||
void __fastcall ResizeALL(void);
|
||||
__fastcall TElasticForm(TComponent* Owner);
|
||||
__published:
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user