Embedding forms in a panel

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

    I current task is to embed a form on a panel which is fine so far but I ran into some graphical glitches
    there. What I want is to have a form with style bsNone embedded on a panel such that it actually does not
    render any border of that form on the panel.

    Now it shows that double border (see image)….
    Please note that I cannot determine if that border is from the embedded form or the panel which has left alignment (but also with borderstyle bsnone and non Bevels defined).

    Is there anything I can do here?

    If I use TSkinProvoder.OnSkinItem I can remove the skinning from the form but of course that is not what it should be…

    Attachments:
    You must be logged in to view attached files.
    #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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.