on 05-22-2015 6:59 AM
Hi,
I defined a panel with Width as 100% from xml view but from controller , I want to read actual width interms of pixel size to use same pixel width for another control to set its width to clear whitespace.
when I tried to use getWidth() simply, it is giving as 100% . Is there any way to get size in pixels,please share recommendations.
Regards,
Koti Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Koti,
Please use jquery function to get the width value in pixel (Highlighted in bold)
var button = new sap.m.Button({
icon: 'sap-icon://accept',
press: function() {
alert($('#myPanel').width());
}
})
var p = new sap.m.Panel("myPanel",{
width : '100%',
content: [
button
]
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.