I tried it, I swear. I still do not see scrollbars on the IPhone. I even tried a scrollable div instead of a textbox control and I still see the same behavior. The user has to put his two fingers on the multiline textbox or div and in this way he can scroll
up and down to see the text.
On the iphone the user can manage to scroll with his two fingers I would say, but on the android phone whether I use a textbox or a scrollable div there is no way for the user to scroll and see the text. I have no idea why.
Member
63 Points
503 Posts
MultiLine Textbox on IPhone
Jan 18, 2012 05:05 AM|afache|LINK
Hi,
My multiLine textbox does not show the scrollbars when there is too much text inside it on the iphone.
Please help!!
My code looks like this:
<%= Html.TextAreaFor(x => x.Body,10,10, new{ maxlength = 1000})%>
css:
#Body
{border:1px solid Black; width:100%; height:100%}
Member
659 Points
376 Posts
Re: MultiLine Textbox on IPhone
Jan 18, 2012 05:11 AM|ReenuGouse|LINK
Use UITextView instead
Or check
http://stackoverflow.com/questions/5021935/creating-multiline-textbox-using-html-helper-function
Member
63 Points
503 Posts
Re: MultiLine Textbox on IPhone
Jan 18, 2012 05:23 AM|afache|LINK
I am creating an asp.net mvc mobile web application, and not a native Iphone application.
Member
659 Points
376 Posts
Re: MultiLine Textbox on IPhone
Jan 18, 2012 05:25 AM|ReenuGouse|LINK
Ok,
http://stackoverflow.com/questions/5021935/creating-multiline-textbox-using-html-helper-function
Check this link...
Member
63 Points
503 Posts
Re: MultiLine Textbox on IPhone
Jan 18, 2012 08:16 AM|afache|LINK
The example on the link did not solve my problem. I still do not have a scroll bar on the textbox on the iphone.
Member
659 Points
376 Posts
Re: MultiLine Textbox on IPhone
Jan 18, 2012 08:42 AM|ReenuGouse|LINK
Ok, then modify ur CSS as below and check..
#Body
{
border:1px solid Black;
width:100%;
height:50%;
overflow-y: scroll;
}
Member
63 Points
503 Posts
Re: MultiLine Textbox on IPhone
Jan 18, 2012 08:50 AM|afache|LINK
I tried the overflow-y:scroll; already and it did not work. Everthing works well on the emulator but on the iphone I don't see a scrollbar.
Member
659 Points
376 Posts
Re: MultiLine Textbox on IPhone
Jan 18, 2012 08:52 AM|ReenuGouse|LINK
Use this..
Member
63 Points
503 Posts
Re: MultiLine Textbox on IPhone
Jan 19, 2012 03:42 AM|afache|LINK
I tried it, I swear. I still do not see scrollbars on the IPhone. I even tried a scrollable div instead of a textbox control and I still see the same behavior. The user has to put his two fingers on the multiline textbox or div and in this way he can scroll up and down to see the text.
Member
659 Points
376 Posts
Re: MultiLine Textbox on IPhone
Jan 19, 2012 04:09 AM|ReenuGouse|LINK
If U want to use Divs, then write this..
Member
659 Points
376 Posts
Re: MultiLine Textbox on IPhone
Jan 19, 2012 04:19 AM|ReenuGouse|LINK
Or Check the below..
Member
63 Points
503 Posts
Re: MultiLine Textbox on IPhone
Jan 20, 2012 03:10 AM|afache|LINK
On the iphone the user can manage to scroll with his two fingers I would say, but on the android phone whether I use a textbox or a scrollable div there is no way for the user to scroll and see the text. I have no idea why.
Member
63 Points
503 Posts
Re: MultiLine Textbox on IPhone
Jan 27, 2012 09:14 AM|afache|LINK
I had to use a plugin called iscroll which solved my problem.