Embedding forms in a panel

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #70865
    m.rabatscher
    Participant

      I actually have a solution but I’m not quite sure if it’s the right one:

      procedure TForm1.sSkinProvider1SkinItemEx(Item: TComponent;
      var CanBeAdded: Boolean; SkinParams: PacSkinParams);
      begin
      CanBeAdded := True;

      // tfrmdbbrowser is the form to be embedded
      if (item is TfrmDBBrowser) then
      SkinParams^.SkinSection := ‘PANEL’;
      end;

      this reduces the border to a minimum.
      Is there another thing I can try?

      #70873
      m.rabatscher
      Participant

        I actually rewrote my approach such that I now use the TsPageControl.
        On the first tab we have the standard form’s elements and on the second one I attach the second form
        via the parent property. The form now has bsNone border style and the skin section used is ‘TRANSPARENT’ (used in the routine above).

        It looks now quite nice but there is an invisible margin of a few pixels which I don’t know where that one can
        come from. I already removed any margin values from the forms/tabs/pagecontrol but still there is a margin when on the main form and the database view tab.

        Is there anything I can do?

        #70963
        Support
        Keymaster

          Hello and sorry for a long time without answer.
          I can’t check it now, unfortunately, but maybe you can try the TFrame component instead of form?

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