Results 1 to 11 of 11

Thread: ScrollBars - In TextBox [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member WilliamRobinson's Avatar
    Join Date
    Feb 2005
    Posts
    219

    Resolved ScrollBars - In TextBox [RESOLVED]

    em me again

    Just want a scroll bar to appear if theres to much text to fit in the box..

    not much else i can say i guess
    Last edited by WilliamRobinson; Apr 18th, 2005 at 05:01 PM.
    Nothing is Impossible you say?......Try slamming a revolving door!

  2. #2
    Fanatic Member Blade's Avatar
    Join Date
    Jan 1999
    Location
    Stoke-on-Trent, UK
    Posts
    527

    Re: ScrollBars - In TextBox

    Just set the Scrollbars property to either Horizontal, Vertical or Both. You'll also need to set the Multiline property = True.

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: ScrollBars - In TextBox

    Just set the scrollbars property of yout Textbox

    EDIT: OOOPs, took way too long - was writing a code that was un-needed. I forgot about the ScrollBars Property untill a moment ago :P

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  4. #4

    Thread Starter
    Addicted Member WilliamRobinson's Avatar
    Join Date
    Feb 2005
    Posts
    219

    Re: ScrollBars - In TextBox

    Ah silly me,

    i set the property to Both but only the verticall is working the horizontal doesnt appear but the vertical does


    thx
    Nothing is Impossible you say?......Try slamming a revolving door!

  5. #5

    Thread Starter
    Addicted Member WilliamRobinson's Avatar
    Join Date
    Feb 2005
    Posts
    219

    Re: ScrollBars - In TextBox

    i have the text box set to resize to the same as the form using :
    VB Code:
    1. Text1.Move 0, 0, Me.Width - 90, Me.Height - 390
    Nothing is Impossible you say?......Try slamming a revolving door!

  6. #6

    Thread Starter
    Addicted Member WilliamRobinson's Avatar
    Join Date
    Feb 2005
    Posts
    219

    Re: ScrollBars - In TextBox

    Any suggestions? its definatly that code Above ^^ because when i remove it i can see the Horizontal bar

    looks like i need a different code for resizing ?
    Nothing is Impossible you say?......Try slamming a revolving door!

  7. #7
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: ScrollBars - In TextBox

    Normally the horizontal scrollbar is not normally required.

    In your case, the textbox is being resized to a size smaller than the original and, so displays it.

    It should display anyway though :\


    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  8. #8
    Fanatic Member Blade's Avatar
    Join Date
    Jan 1999
    Location
    Stoke-on-Trent, UK
    Posts
    527

    Re: ScrollBars - In TextBox

    The horizontal scrollbar should always be at the bottom, however, the slider wont show unless the text is longer than the width of the textbox. And that will only happen if you have word wrap set to false also.

  9. #9

    Thread Starter
    Addicted Member WilliamRobinson's Avatar
    Join Date
    Feb 2005
    Posts
    219

    Re: ScrollBars - In TextBox

    Yeah your right i just removed the hor bar and it done word wrap basicly
    Nothing is Impossible you say?......Try slamming a revolving door!

  10. #10
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: ScrollBars - In TextBox

    Quote Originally Posted by WilliamRobinson
    i have the text box set to resize to the same as the form using :
    VB Code:
    1. Text1.Move 0, 0, Me.Width - 90, Me.Height - 390
    You should change that code. That code expects that the title bar and borders take up 390 twips, which might not be true. Always use the ScaleWidth and ScaleHeight properties instead.
    VB Code:
    1. Text1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight

  11. #11

    Thread Starter
    Addicted Member WilliamRobinson's Avatar
    Join Date
    Feb 2005
    Posts
    219

    Resolved Re: ScrollBars - In TextBox [RESOLVED]

    ah now i can see the HOR bar, not that i need it anymore but still a good thing


    Cheers Everyone
    Nothing is Impossible you say?......Try slamming a revolving door!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width