Results 1 to 6 of 6

Thread: TextBox, MultiLine - a stupid problem....

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Location
    in Poland
    Posts
    390

    TextBox, MultiLine - a stupid problem....

    Welcome

    Someone know? how to change property (Multiline) for a TextBox to True in run - time with simultaneous change his size (height)

    Always, when I trying it finish with a get of error >> Can’t assign to read-only property <<

    I try to do in this way:

    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. With Text1
    4.  
    5.   .MultiLine = True
    6.   .ScrollBars = 2
    7.   .Height = 300
    8.  
    9. End With
    10.  
    11. End Sub

    But something is a wrong, how correctly to make this?

    Thanks in advance
    I know, I know, my English is bad, sorry .....

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: TextBox, MultiLine - a stupid problem....

    You will have to set the multiline property at design time, the others can be set via code
    Chris

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Location
    in Poland
    Posts
    390

    Re: TextBox, MultiLine - a stupid problem....

    Thanks the182guy for quick reply.

    If I understood you well - ONLY at design time? Yes?

    Tamgo
    I know, I know, my English is bad, sorry .....

  4. #4
    Frenzied Member
    Join Date
    Jun 2006
    Posts
    1,098

    Re: TextBox, MultiLine - a stupid problem....

    That's right, but you can simulate that effect with two textboxes. They will need to be set up as a control array, and you'll need a module-level variable to use as an index to the array.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Location
    in Poland
    Posts
    390

    Re: TextBox, MultiLine - a stupid problem....

    Thanks Logophobic, surely it's some way.
    I know, I know, my English is bad, sorry .....

  6. #6
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: TextBox, MultiLine - a stupid problem....

    No, as Logophobic you need two textboxes, one with the MultiLine = True and one with it False. You can put them on top of each other with One being Visible and the other not, and then swap visibility as needed. You don't have to have a control array but it it's neater that way.

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