Skinmanager no internal skin: possible according to the demonstration, but I do not understand

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #36440
    Util_Delphi
    Participant

    Hello. My message is translated by Google. Thank you kindly answer me in very simple English: I'm not English.

    Parameters of SkinManager :

    f5afa0fd96425a242af47458ea6a4765f873b711.png

    0d680d734f8aa58f0ed559bfe157fd82881ec114.png

    This code does not work.

    If there is not at least one internal skin, applied since the beginning of the program, SkinManager does not. Why?

    Code:
    procedure TForm1.Btn_ActiverClick(Sender: TObject);
    begin

    Form1.sSkinManager1.Active := True;
    Form1.sSkinManager1.SkinDirectory := 'C:TOUS LES THEMES'; // Directory of all the skins
    Form1.sSkinManager1.SkinName := 'Acryl';
    Form1.sSkinManager1.RepaintForms(True); // does not matter. Skin not applicated

    Form1.Btn_Quitter.SetFocus;
    end;

    thank you :hello:

    #53067
    Kujo
    Participant

    Hello,

    1. Load your internal skins using the “InternalSkin” property.

    2. Select a skin using the “SkinName” property.

    3. Save the project

    Now the skin you have selected is used as default and it is always loaded when you start the program (this is true also if you use an external skin).

    P.S. Please remember that the name of an internal skin is the name of the skin plus ” (internal)”, example:

    External skin name: “Acryl”

    Internal skin name: “Acryl (internal)”

    Bye

    #53068
    Util_Delphi
    Participant

    Bonjour.

    So I put an inner skin as I usually do.

    b925eb659fcb7c24a71412eba2cad3777f1abc56.png

    procedure TForm1.Btn_ActiverClick(Sender: TObject);

    begin

    Form1.sSkinManager1.Active := True;

    Form1.sSkinManager1.SkinDirectory := 'C:TOUS LES THEMES';

    Form1.sSkinManager1.SkinName := 'Acryl (internal)'; // does not work : Even with (external) it does not work

    Form1.sSkinManager1.RepaintForms(True);

    Form1.Btn_Quitter.SetFocus;

    end;

    It is necessary that the skin is active from the start? No other solution? I think I misunderstood…

    Merci 😉

    #53069
    Kujo
    Participant

    Hello,

    Code:
    procedure TForm1.Btn_ActiverClick(Sender: TObject);
    begin

    //Form1.sSkinManager1.Active := True; // before you have to select a skin
    Form1.sSkinManager1.SkinDirectory := 'C:TOUS LES THEMES';
    Form1.sSkinManager1.SkinName := 'Acryl';
    Form1.sSkinManager1.Active := True;
    Form1.sSkinManager1.RepaintForms(True); // in XE2 it works also without this

    Form1.Btn_Quitter.SetFocus;

    end;

    And don't forget to add the sSkinProvider component!

    #53071
    Util_Delphi
    Participant
    'Kujo' wrote:

    Hello,

    Code:
    procedure TForm1.Btn_ActiverClick(Sender: TObject);
    begin

    //Form1.sSkinManager1.Active := True; // before you have to select a skin
    Form1.sSkinManager1.SkinDirectory := 'C:TOUS LES THEMES';
    Form1.sSkinManager1.SkinName := 'Acryl';
    Form1.sSkinManager1.Active := True;
    Form1.sSkinManager1.RepaintForms(True); // in XE2 it works also without this

    Form1.Btn_Quitter.SetFocus;

    end;

    And don't forget to add the sSkinProvider component!

    #53072
    Util_Delphi
    Participant

    Thank you! It works! It had to sSkinProvider component that I had forgotten.

    #53085
    Support
    Keymaster

    Hello!

    This line is not needed:

    Code:
    Form1.sSkinManager1.RepaintForms(True);
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.