Subscribe Bookmark RSS Feed

JSL: StringColBox's titles are editable by user on form?

ABI

Community Trekker

Joined:

Jun 23, 2016

When I have a input form/window that uses a stringcolbox, the user can doubleclick on the stringcolbox's title and change it. They can't change the values in it, of course, but they can modify the title. Is this intentional? If it is, is there anyway to lock it to prevent the user from changing it?

 

This also seems to be the case for NumberColBox and StringColEditBox, but not NumberColEditBox (which won't let you change the title when double-clicking on it, but will let you reset the formatting).

2 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

'ShowProperties()' helps you here.

 

NewWindow("SCB", scb = StringColBox("Title", {"a", "b", "c"}));
ShowProperties(scb);
Wait(2);
Beep();
scb << lockTitle;
ABI

Community Trekker

Joined:

Jun 23, 2016

Cool, that does lock it, thanks. I still find it odd that they are unlocked for StringColBoxes by default, though :)

 

Also, unfortunately, locking them creates a new issue.

 

Before, the user was able to tab through all the multiple different NumberColEdit boxes scattered across the form. This greatly speeds up entry. When the StringColBoxes are unlocked, using tab would stop the cursor at the titles of StringColBoxes (and the user could accidently overwrite them if they weren't paying attention).

 

Now, when stringcolboxes have their titles locked, the user can't accidently change a title but tab will also only move forward until it encounters a locked-title stringcolbox (at which point it will stop moving, requiring the user to switch back to the mouse and click on the next numbercoleditbox.

 

So if the choice is either to be able to use tab or prevent accidently overwriting a title, tab is more important. Is there possibly a way that I can have both?