Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8088

Re: how to place button in ApplicationHeader

$
0
0

HI Anshul

 

I do not think that adding button in application header contorl looks good. Here how you add an icon to it. You can do the same for button.

 

<style>

.homeicon {

    padding-left: 3px;

    position: relative;

    top: 4px;

}

</style>

 

 

<script>

jQuery(function() {

    var hdr = new sap.ui.commons.ApplicationHeader();

 

    hdr.placeAt("content");

    var icon = sap.ui.core.Icon({

        src: 'sap-icon://home',

        size: '18px',

        press: function() {

            alert('go home');

        }

    }).addStyleClass('homeicon');

    icon.placeAt('content');

 

 

    icon.onAfterRendering = function() {

        $('.sapUiAppHdrLogo').prepend(this.$().detach());

    }

 

 

});

</script>

 

Demo

 

-D


Viewing all articles
Browse latest Browse all 8088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>