locked
MultiLine Textbox on IPhone RRS feed

  • Question

  • User120994544 posted

    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%}

    Wednesday, January 18, 2012 5:05 AM

Answers

  • User120994544 posted

    I had to use a plugin called iscroll which solved my problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 27, 2012 9:14 AM

All replies

  • Wednesday, January 18, 2012 5:11 AM
  • User120994544 posted

    I am creating an asp.net mvc mobile web application, and not a native Iphone application.

    Wednesday, January 18, 2012 5:23 AM
  • Wednesday, January 18, 2012 5:25 AM
  • User120994544 posted

    The example on the link did not solve my problem. I still do not have a scroll bar on the textbox on the iphone.

    Wednesday, January 18, 2012 8:16 AM
  • User-736607127 posted

    Ok, then modify ur CSS as below and check..

    #Body

    {

    border:1px solid Black;

     width:100%

    height:50%;

    overflow-y: scroll;

    }

    Wednesday, January 18, 2012 8:42 AM
  • User120994544 posted

    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.

    Wednesday, January 18, 2012 8:50 AM
  • User-736607127 posted

    Use this..

    <%= Html.TextArea("Body", null, new { cols = "55", rows = "2" }) %>
    now check it once...
    Wednesday, January 18, 2012 8:52 AM
  • User120994544 posted

    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.

    Thursday, January 19, 2012 3:42 AM
  • User-736607127 posted

    If U want to use Divs, then write this..

    <div style="width:300px;height:250px;overflow:auto;"></div> and see..
    Thursday, January 19, 2012 4:09 AM
  • User-736607127 posted

    Or Check the below..

    <%:Html.TextAreaFor(x => x.SomeProperty, new { @class = "resizer" }) %>
    In CSS:
    .
    resizer
    {
    Width: 100px;
    Height: 50px;
    overflow-y: auto;
    }
    Thursday, January 19, 2012 4:19 AM
  • User120994544 posted

    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.

    Friday, January 20, 2012 3:10 AM
  • User120994544 posted

    I had to use a plugin called iscroll which solved my problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 27, 2012 9:14 AM