How to lock a text field?

BlitzPlus Forums/BlitzPlus Programming/How to lock a text field?

julianbury(Posted 2009) [#1]
I need to change text-fields while preventing the user from doing it.
Is this possible?
If so, how?

I thought of using labels but I could not redefine their contents.

What else is there?

lots of little canvases? - I do hope not!

Another approach: Would it be possible to confine the input focus to just one particular text field so that each time the mouse was clicked or the tab key was pressed, the focus would be returned to the target field?

mmh, wonder how to do that ...

Are these problems solvable in BlitzMax?
Ah, but BlitzMax is so intimidating :-(

(-_-)


JRalha(Posted 2009) [#2]
I believe that the following will work...
Create the gadget and disable it then whenever you want the program to set the gadget do...

(...)

EnableGadget gadget
SetGadgetText gadget,text$
DisableGadget gadget

(...)

When you wish the user to enter text

EnableGadget gadget
Activategadget gadget ;if you wish the user to start at a specified gadget...

I don't understand the second part of the question (another approach)...


julianbury(Posted 2009) [#3]
That's great!
I didn't know there was a disable command :-(
Thank you so much :-))
Bye!