Disable Tabbing on Form

Hi,

I have a form that can be “locked” – meaning, the data can be viewed, but should not be changed.

What I’ve done is create a “lock” procedure that looks like this.
There’s a FileGlobal variable called fgLock .

  Case fgLock=""
    //fgLock=""

    // re-enable all objects
    SelectAllObjects
    ChangeObjects "disabled", False()                

  Case fgLock="1"
    //fgLock="1"

    // disable all objects
    SelectAllObjects
    ChangeObjects "disabled", True()

  EndCase
  ShowVariables fgLock
  SelectNoObjects
  CloseActiveObject

This does work well.

The one, more cosmetic, issue I have is that when the form is present, and is locked, and the user hits the “Tab” key, one of the Text Editor Objects will get its text highlighted.

Note: the data canNOT be edited … but, it highlights as if it were editable.

Is there a way to ensure that hitting the “Tab” does NOT highlight any editable fields?

TIA!!

It seems that sending objects to the back with SendToBack somehow pulls them out of the “tab ring”.

It’s not 100% consistent, so I’m not sure if this is a valid solution, but it seems to work for now.

Text Editor objects have an option that controls whether or not the object is included in the tab cycle.

This option can be turned on and off with the changeobjects command if you wish. I don’t remember what the keyword is but you can easily view it in a blueprint. Ok, I just did that for you, it’s $TextEditorTabCycle. I also verified that if you turn that off the tab key won’t do anything.

It seems that sending objects to the back with SendToBack somehow pulls them out of the “tab ring”.

That sounds wrong to me. I definitely wouldn’t rely on that. Use the tab cycle option.

Excellent!

I like that solution much better.

Thanks! :slight_smile: