Create TRzTabSheet at runtime fail

Components on the Raize Panels palette: panels, group bars, page controls, splitters, toolbars, status bars, group boxes, etc.

Create TRzTabSheet at runtime fail

Postby Maxx » Fri Jun 19, 2015 6:25 am

I would create a additionaly TRzTabSheet at runtime with this code ...

Code: Select all
       
TS:=TRzTabSheet.Create(MyRzPageControl);
TS.Caption:='ABC';
TS.Parent:=MyRzPageControl;
TS.PageControl:=MyRzPageControl;


After that you would read the property TS.ClientHeight and expect the height of the page, but it is 0.
Also to set a control to the new page
Code: Select all
MyButton.Parent:=TS
the control is not visible.

If I use a delphi TPageControl the it works fine ...
Regrads
Maxx
Maxx
 
Posts: 20
Joined:
Thu Dec 13, 2012 10:42 pm

Re: Create TRzTabSheet at runtime fail

Postby Raize Support » Fri Jun 19, 2015 6:40 am

Hi,

You need to make the tab sheet active in order to get the client height to be updated and the button to appear.

For example, after creating the tab sheet and setting the TS.PageControl property (btw, it is not necessary to set the TS.Parent property), make the tab sheet active by doing the following:

Code: Select all
  RzPagecontrol1.ActivePageIndex := 0;


Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm


Return to Panels

Who is online

Users browsing this forum: No registered users and 3 guests

cron