DevExpr dxLayoutControl not skinned

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36246
    HeDiBo
    Participant

    The DevExpr dxLayoutControl functions a bit like a panel: it can be aligned to parents and to other layout controls. But above all it serves as an alignment aid for other controls (very nice!). In AC the dxLayoutControl is NOT SKINNED. Example:

    [attachment=6834:DevExprLayoutControl.jpg]

    This is the project: [attachment=6836:DevExprLayoutControl.zip]

    Even if you don't use TdxLayoutControl, you will encounter it in DevExpr dialogs. This is an example of it:

    [attachment=6844:DevExprCustGridForm.jpg]

    I think this can be solved by allowing transparent controls in the ThirdParty list. Adding TdxLayoutControl manually to that list and selecting 'Checkbox” almost does the job, except for the checkbox that's drawn then. Maybe the list of controls to choose from in the substitution list should also contain “FullyTransparent” as one of the choices (a special choice next to “NativePaint”).

    #52278
    Support
    Keymaster

    You can add this type as 'Panel' and change used SkinSection:

    Code:
    procedure TForm8.sSkinProvider1SkinItemEx(Item: TComponent; var CanBeAdded: Boolean; SkinParams: PacSkinParams);
    begin
    if Item is TdxLayoutControl then
    SkinParams.SkinSection := 'TRANSPARENT';
    end;
    #52285
    HeDiBo
    Participant
    'Support' wrote:

    You can add this type as 'Panel' and change used SkinSection:

    Code:
    procedure TForm8.sSkinProvider1SkinItemEx(Item: TComponent; var CanBeAdded: Boolean; SkinParams: PacSkinParams);
    begin
    if Item is TdxLayoutControl then
    SkinParams.SkinSection := 'TRANSPARENT';
    end;

    I hope your suggestion is only for a temporary solution. It will not work at design time.

    A permanent solution may be found in overriding this function in cxLookAndFeelPainters:

    Code:
    function LayoutControlEmptyAreaColor: TColor; virtual;

    or overriding this one:

    Code:
    procedure DrawLayoutControlBackground(ACanvas: TcxCanvas; const R: TRect); virtual;

    I'm not sure which is best.

    Thanks!

    #52289
    HeDiBo
    Participant

    The solution happens to be much simpler:

    Add TdxLayoutControl to the ThirdParty components and set it as TPanel if you want a skinned layout control. Set dxLayoutControl1.ParentBackground to True if you want transparency.

    Sorry for all the fuss :blush:

    Problem solved :a3:

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