How to use background of main form on Delphi TTabSheet

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36053
    passion1
    Participant

    I am busy converting an existing project to use AlphaSkins.

    The existing project is using the regular Delphi TPageControl/TTabsheet.

    I have dropped a sSkinManager and sSkinProvider on the Main form and set the SkinName to Aluminium.

    Now my main form correctly displays with the Aluminium background but since the TPagecontrol/TTabsheets are not

    Alphacontrols, their background is not Aluminium.

    How can I get he background of my old TTabsheets to have an Aluminum background?

    I have tried to insert an Alphacontrol sPanel onto the Delphi TTabsheet with Align=alClient but I cannot get the sPanel to show the Aluminum background of the main form. Please help.

    #51615
    passion1
    Participant

    I forgot to say that I know I am supposed to use Alphacontrol sPagecontrol, but it would be too much work to recreate all the existing Delphi TTabsheets (because they have lots of existing controls which I need for the rest of the project and I do not have not have to display these existing controls)

    So I simply want to continue to use regular Delphi TabSheets but use Alphacontrol sPanel to display the Aluminium background. Then I will only display the Delphi Tabsheets that have an Aluminium background.

    #51616
    CheshireCat
    Participant

    Hello passion1,

    open your form “as text” and replace all TPageControl with TsPageControl and all TTabSheet with TsTabSheet manuell.

    #51617
    passion1
    Participant

    Thanks!!

    I just read the FAQ's and then came across the Alphaconvert utility that did a perfect job!!!

    I only ran into one problem:

    after all TPageControls and TTabSheets were converted my project got an “Incompatible types: TsTabsheet and TTabsheet”

    compilation error with every statement like:

    PageControl1.ActivePage := PageControl1.Pages[10];

    For now I have simply commented out those statements but is there a solution?

    #51618
    CheshireCat
    Participant

    Maybe this will help:

    Code:
    procedure TForm1.sButton1Click(Sender: TObject);
    begin
    sPageControl1.ActivePage := TsTabSheet(sPageControl1.Pages[10]);
    end;
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.