Board index » cppbuilder » Question about inherit form TFormXX

Question about inherit form TFormXX


2003-11-26 05:04:31 PM
cppbuilder68
//--------------------------------------------
// base form
//--------------------------------------------
class TForm_Base : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TEdit *Edit1;
private: // User declarations
public: // User declarations
__fastcall TForm_Base(TComponent* Owner);
};
//--------------------------------------------
// form inherit from TForm_Base
//--------------------------------------------
class TForm_Child : public TForm_Base // <- here
{
__published: // IDE-managed Components
TEdit *Edit2;
private: // User declarations
public: // User declarations
__fastcall TForm_Child(TComponent* Owner);
};
But I cann't see the Button1 and Edit1 at design time.
How to see the base form's components in the ingerit form?
Thanks!
 
 

Re:Question about inherit form TFormXX

On Wed, 26 Nov 2003 17:04:31 +0800, "afatdog" < XXXX@XXXXX.COM >wrote:
Quote
But I cann't see the Button1 and Edit1 at design time.
How to see the base form's components in the ingerit form?
Do you have used the Object Repository? If you haven't
used the aforesaid tool then:
1) Save your form in the object repository: right click
the form and click on "Add to repository..."
2) From the File menu click on "New", then "Other...".
Now, select the form you have previously saved. Make
sure you are choosing the appropriate page in the dialog
window. At the bottom left ot the window, click the
"inherit" radio button then click OK.
3) Modify and save the new form.
Cheers
Giuliano