Jump to content


Photo

Not possible to create control inside TNxTabSheet at runtime


  • Please log in to reply
2 replies to this topic

#1 Bas

Bas
  • Members
  • 28 posts

Posted 10 May 2006 - 01:27 PM

Hi,

When I try the following code where NPC is a TNxPageControl:

CODE
 NxTabSheet := TNxTabSheet.Create(NPC);



 NPC.AddPage(NxTabSheet, FALSE);

 NxTabSheet.Caption := 'some test sheet';



 Edit := TEdit.Create(NxTabSheet);

 Edit.Parent := NxTabSheet;


the TEdit is never displayed on the tabsheet. This actually goes for any control. I have tried TEdit, TPanel, and some third party controls, and they are never put on the sheet.

I also tried to set the ParentWindow property of Edit to NxTabSheet.handle, but this cuases an AV in the inherited constructor of TNxTabSheet.CreateWnd. :?:

Help sad.gif

#2 Bosko (Berg)

Bosko (Berg)
  • Members
  • 7 posts

Posted 10 May 2006 - 02:04 PM

Hello Bas,

Simply, change FALSE in second line to TRUE, or simply delete it and all will work then.

Regards
bosko@bergsoft.net , www.bergsoft.net

#3 Bas

Bas
  • Members
  • 28 posts

Posted 10 May 2006 - 04:51 PM

Then I completly misunderstood the boolean parameter there :roll:

Thanks!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users