Remove subpanel buttons (create and select btn)

Hello everyone,
I want to know how can i remove the create and select btn in subpanel :
My need :
I want to remove the "Create and Select " button from the P_Asw_Contract subpanel located on the P_Asw_Rayon module’s detailview

I have 2 Custom Modules : Departement (P_Asw_Rayon), and Contracts (P_Asw_Contract)
I had followed step by step the instructions of the official article of crm sugar , in this link http://support.sugarcrm.com/Knowledge_Base/Developers/Customization/Modifying_Subpanel_Action_Buttons/index.html but without getting the expected result
So i created : hideBtnSubpanels.php file in <PRJ_NAME>\custom\Extension\modules\P_Asw_Rayon\Ext\Layoutdefs

just for the sake of history i’m replying to this topic

you’re overriding the default condition of the button, so you’re basically saying that just display the create button you’re doing it the other way

<?php

    $layout_defs["current_module"]["subpanel_setup"]["related_module"]["top_buttons"] = array(
        array(
            'widget_class' => 'SubPanelTopSelectButton',
        ),
    );

So, above is saying just display the select button. Don’t forget to quick build and repair

best regards