Results 1 to 4 of 4

Thread: [RESOLVED] How to make readonly textbox

  1. #1

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    Resolved [RESOLVED] How to make readonly textbox

    Hi Guru here,

    I would like to create a readonly textbox. It is a textbox enabled user show selected file path into textbox. When user select the picture or file from attach button, the path of file will show in textbox. However, the textbox couldn't be modified, Copy is allowed.

    I try to use code in keypress event (Search from VBForums).

    vb Code:
    1. KeyAscii = 0

    It is work fine for backspace but keypress event couldn't detect Delete Button and it may delete text if user right hand click pop up menu on textbox.
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

  2. #2

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    Re: How to make readonly textbox

    Sorry for my Stupidness. What i need to do is locked the textbox..

    > - <
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

  3. #3
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: [RESOLVED] How to make readonly textbox

    Code:
    Me.Text1.Locked = True
    use it in appropriate situations. Still better consider using lables if there is no user intervention reqd

  4. #4

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    Re: [RESOLVED] How to make readonly textbox

    Thanks VBFnewcomer.

    However, Label couldn't satisfied my requirement because i need to enable user read the whole path and some of the file path in text is quite long. If i use Label i need set to wraptext, that was not flexible for form space. Furthermore, label cannot copy text.
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

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