Skinning of dynamically created controls?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #47037
    Support
    Keymaster

      Hello

      You can try this code

      Code:
      var
      sBtn : TSpeedButton;
      begin
      sBtn := TSpeedButton.Create(self);
      with sBtn do begin
      Width := 50;
      Height := 50;
      Top := 50;
      Left := 50;
      Parent := self;
      Caption := 'xx';
      end;
      sSkinProvider1.Adapter.AddNewItem(sBtn);
      end;
      #47045
      ralfiii
      Participant
        'Support' wrote:

        Hello

        You can try this code

        Code:
        sSkinProvider1.Adapter.AddNewItem(sBtn);

        As this is the main form I don't have a SkinProvider there, only a SkinManager.

        Is “Adapter” (or similar) also available from a TsSkinManager-Component?

        Or should I place a SkinProvider on the mainform also anyway? (I thought I only need SkinProvider on additional forms)

        Thanks!

        #47071
        Support
        Keymaster

          Yes, TsSkinProvider component should be placed on each form where it possible.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.