Board index » cppbuilder » Creating edit boxes in RumTime

Creating edit boxes in RumTime

Hi all,

Is it possible to create new edit boxes in runtime?

For a school project we are creating an order form and for each product
an edit box is needed to allow the user enter amount wanted. But the
amount of products available is not constant.

Currently we have a fixed amount of edit boxes which we show or hide,
depending on the amount of products. There must be a easier way?

thanks in advance,

William

 

Re:Creating edit boxes in RumTime


Quote
On Fri, 07 Apr 2000 11:11:47 +0200, jnwl <j...@hotmail.com> wrote:
>Is it possible to create new edit boxes in runtime?

Sure.

In your .h:

private: // User declarations
  TEdit* Edit;

In your .cpp:

(like maybe in your Form's constructor)

Edit = new TEdit(this);
Edit->Parent = this;
Edit->Text   = "Buffy";
Edit->SetBounds(20, 20, 200, 21);
// and whatever properties you need to set in advance

Also see: http://www.bcbdev.com/faqs/faq2.htm

Hens Zimmerman

Re:Creating edit boxes in RumTime


Quote
> >Is it possible to create new edit boxes in runtime?

> Sure.

> Hens Zimmerman

thx, I'll give it a try

William

Other Threads