Results 1 to 9 of 9

Thread: positioning text at run time??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Posts
    18

    Talking

    1. How do I position text in a text box at run time??
    2. I am populating a text box at runtime from a database, but each record does not appear in a new line. the records appear wrapped up. If I use vbcr for a new line, it comes as a "|" but no new line. the multiline property is set to true. How do I insert a new line?? Pleae help me with this stupid problem.

  2. #2
    Guest

    Smile

    mastana , has got same problems with textbox.
    I think it is a bug.
    So I've used a listbox instead.
    Try it out.

  3. #3
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Use vbLf or vbCrLf instead of vbCr...
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  4. #4
    Lively Member
    Join Date
    Aug 2000
    Posts
    114
    Instead of just putting vbCR at the end of the line use vbCrLf. This is carriage return line feed.

  5. #5
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    Ont, Canada, Earth
    Posts
    458
    You can also use vbNewLine. Same as vbCrLf only easier to remember.
    Thanks

    Tomexx.

  6. #6
    New Member
    Join Date
    Aug 2000
    Posts
    10

    Move

    to move an object at runtime:

    Text1(1).Move 100, 100

    martin

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Posts
    18

    Question formatting data in text

    I have an access database with the structure:

    Name(20)
    Age(3)
    Sex(1)
    Address(50)

    Now when I display the records in a text box, the data appears as:
    mozart 20 M chvkhgodfgdfgds
    beethoven 25 M ghkdfhghgkhgogjhohgfoh
    Alex 18 M bfgkhkghljgjhogjho
    Manish 23 M skdhfkhghgdg

    How can I make this data appear symmetrical so that all the columns can fall in line and I can give proper column headings????

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try inserting a couple of vbTabs in between the columns. Better still, use a ListView control.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9
    Lively Member
    Join Date
    Aug 2000
    Posts
    114
    Set the font name of the text box to courier

    When you fill the text box have a max for each field.

    For example let say your first field can be a max of 20. You would add a string like this

    text1 = left$(sfield + space$(20),20)

    What this will do is always give a set length for the data that you would add. Just continue doing this for each field.

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