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

Java Development

Reply
Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

How to add button over browser field

Hello every one

 

 In a verticalFieldManager i am adding a browser field as a first child and button field as second child ,but my button is not showing top of the browser field . How to do can any one give me an idea.

 

Thanks.

Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to add button over browser field

To be clear here I understand that you want the Button to over the top of your BrowserField, in other words, the BrowserField is sort of background behind your button.

 

You could try something like the code you will find in here:

http://supportforums.blackberry.com/t5/Java-Development/Adding-static-button-in-a-Scrollable-list/td...

 

But I very much doubt that this will work.  BrowserFields are greedy and like to take up the whole screen.  The best way to get a button in a BrowserField is have the Browser HTML include the button!  But I have no idea how you could get notification of the button click back to your program.

 

One other approach I would consider is the EyelidManager - perhaps it will allow you to add a Button that is displayed over the BrowserField,  But I have no idea how to do that either. 

 

If you don't want the BrowserField to take up the whole screen, then you can leave space for the Button, for example, you can put the Button in the Status area of a MainScreen. 

 

Or you can add the 'button' as a menu item and tell people to use the menu when they want to interact.

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: How to add button over browser field

Hi peter_strange

 thanks for response

 

  I saw your link and staticbuttonmanager  class and how you are adding a pair of list field and button, in same way I tried here,in the pair of  browser field and button  ,

 

 but here problem is that the button is going in background of browser field ,I mean browser field always coming on the top and my button is not visible on top.

 

 

Here, I am adding a button because by clicking on that I have to open some new screen in my app.

 

Thanks so please provide me some idea.

 

Thanks

Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to add button over browser field

Either

 

a) Restrict the BrowserField and give space to your Button - the status area of the MainScreen is the easiest way to do this, or

b) Use a menu not a Button.

 

As noted, I think adding a Button over the top of a browserField is unlikely to work. 

Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve

Re: How to add button over browser field

Hi peter thanks for quick response

 

actually  my design is like that I have so many screen with the same design and in other screen I am adding pair of manager and button so it is working fine, But my only one screen has to be displayed with browser field data in background of button. So I am feeling little hard to change the design.

 

  any way whatever is possible that only we can do.

  

if you found some other idea please let me know.

 

Thanks.

Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to add button over browser field

I have no other ideas sorry. If someone asked me to develop an app that required a button in front of a BrowserField, I would tell them to change their design.