Jump to content


NxPagecontrol: Tabs not painted


  • Please log in to reply
2 replies to this topic

#1 Frank

Frank
  • Members
  • 13 posts

Posted 17 May 2011 - 06:05 PM

Hello,

with the following code i create a NxPagecontrol at runtime:

CODE
    pgMain := TNxPageControl.Create(frmMain);
    with pgMain do
    begin
      Top := 46;
      Left := 3;
      Width := 1133;
      Height := 200;
      Options := [pgBoldActiveTab];
      BackgroundKind := bkTransparent;
      DoubleBuffered := False;
      Name := 'pgMain';
      Parent := frmMain;
    end;


Then i create a bunch of NxTabsheets:

CODE
    for iCnt := 0 to slAcc.Count - 1 do
    begin
      tsSheet := TNxTabSheet.Create(pgMain);

      pgMain.AddPage(tsSheet);
      tsSheet.Visible := True;
      tsSheet.Caption := slAcc[iCnt];
      Edit := TEdit.Create(tsSheet);
      Edit.Parent := tsSheet;
    end;


where slAcc is a Stringlist containing the captions.

The Problem is that the editfields were shown, but not the tabs.

If i click with the mouse in the area where the tabs must be, they appear in a range around the mousecursor (see screenshot).

Any advice?

Regards
Frank

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 6,687 posts
  • Gender:Male

Posted 17 May 2011 - 08:46 PM

Hi Frank,

Please try to add:

CODE
    pgMain.ActivePageIndex := 0;


at the end of procedure.

I hope that this helps.

Best regards
boki@bergsoft.net
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Frank

Frank
  • Members
  • 13 posts

Posted 18 May 2011 - 12:48 PM

Yes, it helps smile.gif  


Thank you, Boki.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users