Board index » cppbuilder » Control '....' has no parent window
Paolo Casagrand
![]() CBuilder Developer |
Fri, 28 May 2004 16:04:16 GMT
|
Paolo Casagrand
![]() CBuilder Developer |
Fri, 28 May 2004 16:04:16 GMT
Control '....' has no parent window
I am writing some compnents...
For one of this, at design time, I receive this error from the IDE: Control '.....' has no parent window I can't understand why! Do you have any idea? I checked my code but I can't figure the problem - more over putting the control in Form using Text mode sometimes works!!! Other question: it is possible to have the property BorderStyle for thanks, Paolo |
Paul Ashto
![]() CBuilder Developer |
Sat, 29 May 2004 07:27:37 GMT
Re:Control '....' has no parent windowPaolo Casagrande <neme...@intelly.com> schrieb in im Newsbeitrag: Quote> I am writing some compnents... 'visual' properties in the constructor of your component. The problem is that the constructor is processed before the form is visible. Clear is one candidate for this error in TComboBox( if I remember correctly). |
Paul Ashto
![]() CBuilder Developer |
Sat, 29 May 2004 23:50:20 GMT
Re:Control '....' has no parent window"Paolo Casagrande" <neme...@intelly.com> schrieb im Newsbeitrag Quote
void __fastcall DataChange(TObject* Sender); look like. |
Paolo Casagrand
![]() CBuilder Developer |
Sat, 29 May 2004 23:38:19 GMT
Re:Control '....' has no parent window"Paul Ashton" <asht...@worldonline.de> ha scritto nel messaggio Quote
is 'visual', as you can see... .h file class PACKAGE TxDBMaskEdit : public TCustomMaskEdit AnsiString __fastcall GetDataField(); void __fastcall DataChange(TObject* Sender); void __fastcall CMExit(TWMNoParams Message); BEGIN_MESSAGE_MAP __published: __property BorderStyle; Quote}; ... __fastcall TxDBMaskEdit::TxDBMaskEdit(TComponent* Owner) Quote} { if (FDataLink) { FDataLink->OnUpdateData = 0; FDataLink->OnDataChange = 0; FDataLink->Control = 0; delete FDataLink; } - Hide quoted text - - Show quoted text - Quote} |
J.A. Bijsterbosc
![]() CBuilder Developer |
Sat, 29 May 2004 18:49:56 GMT
Re:Control '....' has no parent windowHello Paolo, "Paolo Casagrande" <neme...@intelly.com> schreef in bericht Quote> I am writing some compnents... when you start setting properties of an included component in the new component constructor. It means that some properties you set need a handle, but it isn't created yet... If this is the case you need to override the TControl::CreateWnd() function // in header Quote}; void __fastcall TMyComp::CreateWnd() { ParentComp::CreateWnd(); // now the handle is there, do your settings Quote} -- Jan email: bijs...@worldonline.nl |
Paolo Casagrand
![]() CBuilder Developer |
Sun, 30 May 2004 16:35:38 GMT
Re:Control '....' has no parent window"Paul Ashton" <paul.ash...@admin-itc.de> ha scritto nel messaggio Quote
a similar code, for a component inherited from TComboBox work fine... bye, Paolo |
Mark Cashma
![]() CBuilder Developer |
Tue, 08 Jun 2004 11:38:25 GMT
Re:Control '....' has no parent windowHi, Paolo! I think the following in your constructor will help take care of the Parent = dynamic_cast<TWinControl *>(Owner); Some properties when set require the control to have been parented, but ------ |
Paolo Casagrand
![]() CBuilder Developer |
Fri, 11 Jun 2004 15:57:35 GMT
Re:Control '....' has no parent windowthanks a lot... it work fine! Nice holiday to all Paolo "Mark Cashman" <mcash...@temporaldoorway.com> ha scritto nel messaggio Quote> Hi, Paolo! Quote> (original digital art, writing, music and more) |