Results 1 to 8 of 8

Thread: Text box

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    I am trying to make an HTML editor but I get stuck on little things because I'm a beginner.

    I have a Text box (Text1), but it's too big for the form. I don't know how to make it go to the edge of the page and stop, using scroll bars from there on. thanks for any help.
    If you think education is expensive, try ignorance.

  2. #2
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357
    Set the textboxe's Multiline property to TRUE, and notice that it has a Scrollbar property. Set that to Vertical (or whatever you want). See if that solves your problem.
    ~seaweed

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    size it

    in design time you just stretch it to the size you want it or you can set it at run time using the left and top properties.
    ie...look at your form properties and see what the left property reads for your form
    let's say it is 100..then in your form app you could say
    text1.left = 95
    as for the height...check the property and see where it is and then adjust it accordingly
    text1.top = 100

    set the multiline property to true
    and set the scrollbars to vertical or horizontal or both

    Hope this helps..
    to see the property box of an item click on the item in design time...hold down the ctrl key and r and the property box will pop up.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    What about if it's maximized? Everyone's resolution is different. How would I say form width - 600?
    If you think education is expensive, try ignorance.

  5. #5
    Lively Member
    Join Date
    Jun 2000
    Posts
    67
    if u want the text thing to fit the form when the form is maximized then

    Private Sub Form_Resize()
    Me.Text1.Height = Me.ScaleHeight
    Me.Text1.Width = Me.ScaleWidth
    End Sub

    I HOPE THAT WORKS

    IT BETTER WORK

  6. #6
    Lively Member
    Join Date
    Jun 2000
    Posts
    67
    DONT WORRY ABOUT RESOLUTION VB WILL TAKE CARE OF THAT

    LEAVE IT TO MS - TO SCREW THINGS UP

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    323
    That did make it maximize, but now I can't see the scroll bars. when I write too much it just runs off the screen. How would I fix that?
    If you think education is expensive, try ignorance.

  8. #8
    Lively Member
    Join Date
    Jun 2000
    Posts
    67
    First of all make sure that the text box top propery is 0 and left is also 0 if your project doesnt let you then or u the text box has to be away from the top or away from the side

    see how much ur away from the top if ur 300 away then do this

    Private Sub Form_Resize()
    Me.Text1.Height = Me.ScaleHeight - 300
    Me.Text1.Width = Me.ScaleWidth
    End Sub

    capish? hope it works

    if ur left doesnt equeal 0 then

    Private Sub Form_Resize()
    Me.Text1.Height = Me.ScaleHeight
    Me.Text1.Width = Me.ScaleWidth - (what ever left equals)
    End Sub

    or both

    Private Sub Form_Resize()
    Me.Text1.Height = Me.ScaleHeight - (what ever top equals)
    Me.Text1.Width = Me.ScaleWidth - (what ever left equals)
    End Sub


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