Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Trusted Contributor
Posts: 166
Registered: ‎12-09-2011
My Device: 9550,9300,9800,9700,9900,9850,9860
Accepted Solution

Add icon to MenuItem in Webworks

Hi...

 

I want to add image icon to MenuItem but i don't know how to do that...
i didn't get any code.

Please help me....if any one have any code or hints please share it.... 

Thanks & Regards,
Nitish Subudhi

Feel Free To Press The Like Button On The Right Side To Thank The User That Helped You.
Please Mark Posts As Solved If You Found a Solution.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Add icon to MenuItem in Webworks


NitishSubudhi wrote:

Hi...

 

I want to add image icon to MenuItem but i don't know how to do that...
i didn't get any code.

Please help me....if any one have any code or hints please share it.... 


Hi. Which menu do you mean to add items to? Can you add some more informations!


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Trusted Contributor
Posts: 166
Registered: ‎12-09-2011
My Device: 9550,9300,9800,9700,9900,9850,9860

Re: Add icon to MenuItem in Webworks

MenuItem

 

in the above image...I want to add icon to Menu and Mobile Offer...But I didn't find the appropriate code for this...
plz help me...If any one know the code... 

Thanks & Regards,
Nitish Subudhi

Feel Free To Press The Like Button On The Right Side To Thank The User That Helped You.
Please Mark Posts As Solved If You Found a Solution.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Add icon to MenuItem in Webworks


NitishSubudhi wrote:

MenuItem

 

in the above image...I want to add icon to Menu and Mobile Offer...But I didn't find the appropriate code for this...
plz help me...If any one know the code... 


Hi NitishSubudhi.

Need to repeat my first post since I think we need to know what menu (and mobile offer) do you mean. Maybe you have a closer look to the following post and confirm or not if this is what you are looking for: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/BB10-how-to-add-icon-to-notifica...


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Add icon to MenuItem in Webworks

Ok, since you changed the image to a device specific I'm now aware of that you are not asking this question regarding to WebWorks for BB10 or PlayBook. So I think it might be the following Knowledge Base article you are searching for, isn't it: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Adding-Menu-Items-using-the-Blac...


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Trusted Contributor
Posts: 166
Registered: ‎12-09-2011
My Device: 9550,9300,9800,9700,9900,9850,9860

Re: Add icon to MenuItem in Webworks

ItemMenu.png               ItemMenu_BB10.png

 

Hiiii LBP,
Thanks for your Reply...
The left image is java code of BB6.
And the right image is javascript code of Webworks BB10.
Actually i want the code to set icon for menu items like the upper left image in Webworks BB10.
This is possible for BB6 but I don't know the code for Webworks BB10.
please help me...
 

Thanks & Regards
Nitish Subudhi 

Thanks & Regards,
Nitish Subudhi

Feel Free To Press The Like Button On The Right Side To Thank The User That Helped You.
Please Mark Posts As Solved If You Found a Solution.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Add icon to MenuItem in Webworks


NitishSubudhi wrote:

ItemMenu.png               ItemMenu_BB10.png

 

Hiiii LBP,
Thanks for your Reply...
The left image is java code of BB6.
And the right image is javascript code of Webworks BB10.
Actually i want the code to set icon for menu items like the upper left image in Webworks BB10.
This is possible for BB6 but I don't know the code for Webworks BB10.
please help me...
 

Thanks & Regards
Nitish Subudhi 


Hi. The images aren't shown up for me here. Seems same issue as of last posts?!


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Add icon to MenuItem in Webworks


NitishSubudhi wrote:      

 

Hiiii LBP,
Thanks for your Reply...
The left image is java code of BB6.
And the right image is javascript code of Webworks BB10.
Actually i want the code to set icon for menu items like the upper left image in Webworks BB10.
This is possible for BB6 but I don't know the code for Webworks BB10.
please help me...
 

Thanks & Regards
Nitish Subudhi 


To give you a hint for your source code I would need to have a closer look to it. If I understand right you have some JS source code for the menu running in BB10 and want to add images to the menu items? Maybe you need to give bbUI.js a try with the nice action-bars where you can add images as well: https://github.com/blackberry/bbUI.js/wiki/Action-Bar


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Trusted Contributor
Posts: 166
Registered: ‎12-09-2011
My Device: 9550,9300,9800,9700,9900,9850,9860

Re: Add icon to MenuItem in Webworks

Hi LBP,

 

I am using the code given below:
 

function HomePage() {
changePage("home.html", "slide");
}
var itemhome = new blackberry.ui.menu.MenuItem(false, 1, "Home", HomePage);
if (!blackberry.ui.menu.hasMenuItem(itemhome)){
blackberry.ui.menu.addMenuItem(itemhome);
}

I am adding all the menu Items like this way,
So my problem is to add an image beside Each menu items align Left..

Please help me if any one know the solution.. 

Thanks & Regards,
Nitish Subudhi

Feel Free To Press The Like Button On The Right Side To Thank The User That Helped You.
Please Mark Posts As Solved If You Found a Solution.
Developer
Posts: 214
Registered: ‎01-07-2011
My Device: Bold 9900
My Carrier: Rogers

Re: Add icon to MenuItem in Webworks

Sadly not possible with straight WebWorks, you would need to write a custom extension to do it for you. Details on that here http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Building-a-BlackBerry-WebWorks-J...

 

(a list of the currently available community APIs: https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Smartphone)

--
Rory (@roryboy)
Click "Accept as Solution" if post solved your original issue. Give like/thumbs up if you feel post is helpful