Results 1 to 10 of 10

Thread: [RESOLVED] TextBox Next Line

  1. #1

    Thread Starter
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Resolved [RESOLVED] TextBox Next Line

    I have a textbox where you enter notes.

    How do I change it so instead of when the user presses "Enter or Return" it exits to textbox to move the cursor to the nextline in the textbox.

    Example: In the textbox.(Assume the horizontal/vertical lines are the boundries for my textbox)
    _______________________
    | Notes Go Here! <Enter> |
    | <Cursor> |
    |______________________|

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: TextBox Next Line

    your textbox needs the MultiLine Property set to True.

  3. #3
    Frenzied Member bmahler's Avatar
    Join Date
    Oct 2005
    Location
    Somewhere just west of the Atlantic
    Posts
    1,568

    Re: TextBox Next Line

    try this

    VB Code:
    1. Private Sub Text1_KeyPress(KeyAscii As Integer)
    2. If KeyAscii = vbkeyenter Then
    3.     Me.Text1.Text = Me.Text1.Text & vbCrLf
    4. End If
    5. End Sub

    or if it is set to multiline It will just do it automatically
    Boooya
    • Visual Studio 2008 Professional
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • Don't forget to rate helpful posts!
    • If you're question was answered please mark your thread [Resolved]


    Code Contributions:
    PHP
    PHP Image Gallery v1.0PHP Image Gallery v2.0
    VB 2005
    Find Computers on a networkSimple License EncryptionSQL Server Database Access dllUse Reflection to Return Crystal ReportDocumentSilently Print PDFGeneric Xml Serailizer


    Useful Links: (more to come)
    MSDN (The first and foremost)MSDN Design Guidelines API Reference • Inno Setup CompilerInno Setup PreprocessorISTool - Fairly easy to use GUI for creating inno setup projects • Connection StringsNAnt -Automated BuildsCruise Control .NET - Frontend for automated builds

  4. #4
    Member
    Join Date
    May 2006
    Posts
    60

    Re: TextBox Next Line

    enable multiline from the textbox

    you can do that in the menu at the right, search for multiline and set it true

  5. #5
    Member
    Join Date
    May 2006
    Posts
    60

    Re: TextBox Next Line

    lol 3 replays at same time

  6. #6

    Thread Starter
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: TextBox Next Line

    Doh! Wrong section this should be in the Database section or VBA - Sorry! - But nice speedy replies.

    Hopefully a mod can move this....

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  7. #7
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: TextBox Next Line

    why is this the wrong section? has your question not been answered?

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: TextBox Next Line

    Quote Originally Posted by Jumpercables
    Doh! Wrong section this should be in the Database section or VBA - Sorry! - But nice speedy replies.

    Hopefully a mod can move this....
    Where do you want it? DB or VBA?

    It looks to me more of a coding issue, so I'm guessing Office Development, but it is your thread, so your call.

  9. #9

  10. #10

    Thread Starter
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: TextBox Next Line

    VBA Sorry

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

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