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
New Developer
ashihs_k
Posts: 31
Registered: ‎09-24-2008
My Device: Not Specified

how to create a scroll box.

Hi,

I am developing WAP application and I want to create a scroll box which contain the text. text is scroll within the box and also shows the scroll bar.

 

I used following code, it working fine on IE and Mozila on desktop but not on mobile browser.

 

<div style="width: 50px; height: 50px; overflow: auto; overflow-y: auto; position: absolute">Scrollable Text.....</div>

 

How can i create this.

I am using XHTML..

 

Waiting for your reply..

 

Thanks

Ashish

New Developer
ashihs_k
Posts: 31
Registered: ‎09-24-2008
My Device: Not Specified

Re: how to create a scroll box.

Hi friends,

 

plz reply..

 

Is it possible or not.

 

and how?

 

Thanks

Ashish

Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: how to create a scroll box.

Overflow-scroll boxes are not supported. However, you can use an iframe or something to achieve a similar effect.
New Developer
ashihs_k
Posts: 31
Registered: ‎09-24-2008
My Device: Not Specified

Re: how to create a scroll box.

Hi,

I tried iframe,

no solution found using iframe.

 

can u give me example how to do this.

 

thanks

Ashish

Guru I
Xandrex
Posts: 18,406
Registered: ‎07-29-2008
My Device: Z30, Playbook, 9320BES
My Carrier: B&You _ SFR

Re: how to create a scroll box.

the HTML element < iframe > cannot be read by a Blackberry Browser if the OS version is 4.5 or lower. For 4.6 and higher, I don't know.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: how to create a scroll box.

Iframes do work in 4.6+. At least basic ones do. Try this:

<iframe style="border: none; width: 50px; height: 50px;" src="data:text/html,Scrollable Text....."></iframe>

If you have more content inside the box you'll probably want to break it out into a separate page and point the src attribute there. Also I would suggest re-thinking what you're trying to do since scrollboxes like this are generally not good for usability.