How to get an Insertion Carat in a ReadOnly TextArea

  1. 3 weeks ago

    Arthur G

    Nov 20 Pre-Release Testers

    In a previous discussion, Selecting text Textarea and readonly Tim gave me clues to getting a Carat, but I cannot find anymore reference.

    @Tim Parnell Oct 8 Pre-Release Testers
    Arthur Gabhart But question. I thought you could NOT get a cursor if it was readOnly, so I assumed it was obvious about the mouse.
    Correct?
    Here's a reference to help with that. I just tested these results:

    Windows Read Only:
    Insertion carat
    Selectable

    Mac Read Only:
    No insertion carat
    Selectable

    Windows Enabled False:
    Visual cue

    Mac Enabled False:
    No visual cue

    So, my question is (outside of the obvious) what to XOJO is an insertion carat.
    I can find no reference or discussion to a Carat.
    How do I get one?

    You must be talking about a caret instead of a carat. Also, different OSes can have different interpretations of what is best to the end-users and it is usually a good idea to keep your application in accordance with the OS it is running on, unless you have specific needs.

    I you absolutely want the caret to be displayed, you (probably) can set ReadOnly to false while returning True in the KeyDown Event (which will prevent any modification). You would also need to prevent anything from being pasted or any drag&drop operation.

  2. Stéphane M

    Nov 22 Answer France

    You must be talking about a caret instead of a carat. Also, different OSes can have different interpretations of what is best to the end-users and it is usually a good idea to keep your application in accordance with the OS it is running on, unless you have specific needs.

    I you absolutely want the caret to be displayed, you (probably) can set ReadOnly to false while returning True in the KeyDown Event (which will prevent any modification). You would also need to prevent anything from being pasted or any drag&drop operation.

  3. Arthur G

    Nov 22 Pre-Release Testers

    Thanks. I was wondering if it was an OS thing.

or Sign Up to reply!