Firemonkey TSpinBox height

  

I’m using C++ Builder 10.3 and my application is for Android, please note I’m very new to C++ Builder

I’m trying to change the font size and height of a TSpinBox but i’m unable to change the height.

I tried by best to port the following Delphi solution
Firemonkey TEdit height but with no joy and i’m a total lose.
AdjustFixedSize is declared private i dont think its being overridden, i have also tried creating a setter and calling it but yet again I was unable to get it to work. The biggest problem i have is my lack of C++ Builder knowledge.

Header

class TMySpinBox : public TSpinBox{

public:
protected:
virtual void AdjustFixedSize(const TControl Ref) ;

};

CPP

TMySpinBox::TMySpinBox() : TSpinBox(0){};
void TMySpinBox::AdjustFixedSize(const TControl Ref){
SetAdjustType(TAdjustType::None);

Code

TMySpinBox* SpinBox1 = new TMySpinBox();

SpinBox1->ControlType=TControlType::Platform;
SpinBox1->Parent=Panel1->Parent;
SpinBox1->Position->Y=16.0;
SpinBox1->Position->X=16.0;
SpinBox1->Min=2;
SpinBox1->Max=99;
SpinBox1->Font->Size=48;
SpinBox1->Visible=true;
SpinBox1->Value=2;

SpinBox1->Align=TAlignLayout::None;
SpinBox1->Height=100;
Width=100;

Comments are closed.