How to remove space of title and minimize button

Add-in Express™ Support Service
That's what is more important than anything else

How to remove space of title and minimize button
Remove top empty space of hidden title, minimized buttons and other buttons 
Lokesh Sharma




Posts: 18
Joined: 2020-03-15
Hi

I am able to remove minimized button by IsMinimizedStateAllowed = false and remove title by giving empty string in to text of ADDXOIForm. But, that space is still there and my form is not starting at top. I have given some border style of Form which is not touching TOP ribbon due to space of Title and minimized button which is hidden.

Please check this screenshot https://prnt.sc/rji41w.

How can I remove top space?

Regards,
Lokesh
Posted 20 Mar, 2020 04:23:06 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Lokesh,

Start with ADXOlFromsCollectionItem.AlwasyShowHeader=false. Still, the header will be shown if there's a property enabled that makes the header necessary. Say, if you have ADXOlFromsCollectionItem.IsDragDropAllowed == true or ADXOlFromsCollectionItem.CloseButton == true.

Also note that regardless of these settings, the header will be shown if there's another pane (say, by another add-in) in the same region.

To hide that area unconditionally, you override the ADXOlForm.EnableHeader property. In this case your add-in will be responsible if the end user is unable to switch to another add-in's pane due to the absence of UI controls required to do this.


Andrei Smolin
Add-in Express Team Leader
Posted 20 Mar, 2020 05:23:52 Top
Lokesh Sharma




Posts: 18
Joined: 2020-03-15
Hi Andrei,

Thanks for your support, It worked for me.

I am also getting little empty space at bottom. You can check https://prnt.sc/rjkyo8.

Let me know how to remove this space.

Regards,
Lokesh
Posted 20 Mar, 2020 06:43:08 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Lokesh,


public partial class ADXOlForm1 : AddinExpress.OL.ADXOlForm
{
    // ?Â?Ð?? ADXOlForm implementation
    protected override Type GetContainerControlType()
    {
        return typeof(MyContainerPane);
    }
}

public class MyContainerPane : ADXContainerControlOL
{
    public override Padding Padding
    {
        get
        {
            var padding = base.Padding;
            padding.Bottom = 0;
            return padding;
        }
    }
}



Andrei Smolin
Add-in Express Team Leader
Posted 23 Mar, 2020 03:18:55 Top