Results 1 to 11 of 11

Thread: Delete Key And Dropdown Menu

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44

    Question

    How Do I Delete Text Using The 'Delete' Key Like Wordpad Does, I Already Have A Dropdown Menu With A Hotkey Of Delete, The Only Problem Is That I Dont Know How To Delete Text Without Getting A Box When I Try To Delete A Carriage Return?
    I Think I Might Dont Know The Answer To That One...

  2. #2
    Lively Member Kersey's Avatar
    Join Date
    Jun 1999
    Location
    The Netherlands
    Posts
    101
    please specify what textbox r u using !
    or supply some code.

  3. #3
    Junior Member
    Join Date
    Jun 2000
    Location
    Manchester, England
    Posts
    28
    There may be a few options for this one, but as the previous member said, more information is required please.

    Regards
    We watch in reverence as Narcissus is turned to a flower.

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44
    im using a multilined textbox, and heres the code that i was using that doesnt work -

    <-----Code----->
    Private Sub Delete_Click
    Text1.Sellength = 1
    Text1.SelText = ""
    End Sub
    <-----Code----->
    I Think I Might Dont Know The Answer To That One...

  5. #5
    Junior Member
    Join Date
    Jun 2000
    Location
    Manchester, England
    Posts
    28
    Still not quite sure what you are attempting to achieve here. Purely by setting Text1.SelText to "" (omit the line Text1.SelLength = 1) will delete any highlighted text in the text box, and also pressing the delete key will give the same result. You can put that code in a sub routine and call it from your menu routine (or put it directly in the menu control's code). And what is this "box" you are getting when you try to delete a carriage return?

    Sorry to be a pain...Please elaborate
    We watch in reverence as Narcissus is turned to a flower.

  6. #6

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44
    This box that im talking about is a box that i get when i try to delete something that isnt there (you also get the box in the file when you try to make a Wordpad doc into a text file).Sorry Its Hard To Explain...
    I Think I Might Dont Know The Answer To That One...

  7. #7
    Lively Member
    Join Date
    Jun 2000
    Posts
    67
    like an error box?

    on error goto hell
    'code
    'code
    'code
    hell:
    msgbox "on error occured possible cause u screw3d up",,"title"

  8. #8

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44
    No Not A Error Box, Its A Box Inside The Textbox Thats The Size Of A Character.
    I Think I Might Dont Know The Answer To That One...

  9. #9

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44
    Yeah Thats What It Is, I Get That Thing When I Try To Delete This(Its Hard To Explain):
    ----------------------------------
    |Hello, How Are You Today, |
    |Im Fine. |
    ----------------------------------
    ` Hello, How Are You Today, Is Deleted But Right Before Im Fine Takes Its Place I Get 
    ----------------------------------
    |  |
    |Im Fine |
    ----------------------------------
    I Think I Might Dont Know The Answer To That One...

  10. #10
    Guest
    Hold on a sec.

    Code:
    Private Sub Delete_Click 
    Text1.Sellength = 1 
    Text1.SelText = "" 
    End Sub
    you were using this code because your Del key was a Shortcut for a menu? If the menu's purpose is to Delete something, then you should only use Text1.SelText=""

  11. #11

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44
    Yes I Tried That, But When You Try To Delete A Carriage Return, That Rectangle Comes up, And I Dont Want The Rectangle To Come Up.
    I Think I Might Dont Know The Answer To That One...

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