"Slava Paperno" <[EMAIL PROTECTED]> wrote
I have a text member with its editable property set to false when its
sprite is displayed on the stage. I want the member to become editable when
the user clicks the sprite:
on beginSprite me
sprite(me.SpriteNum).member.editable = false
end
on mouseDown me
sprite(me.SpriteNum).member.editable = true
end
What happens is that when I click the text sprite, the member does become
editable, and the focus is in the sprite, and I can type new text in. But
the blinking insertion point is not displayed, and I have to type blindly.
After the user inputs his text, I want him to he click the Done button so
the input box becomes non-editable again. When the user clicks the input
box again, I want the text member to be editable again.
Hi Slava,
My experience is slightly different. When testing with DMX04 on Windows
XP2, in the Object Inspector, I can see that the text member is editable and
that the keyboardFocusSprite is set to the sprite that contains it... but no
keyboard input appears in the member. It takes a second click on the sprite
to make the text insertion point appear and to make the member accept
input. It may be that making a text member editable has different
consequences in different environments.
Is this the only editable text member on the Stage? If so, one solution
would be to avoid changing the editable of the member. Instead, when you
click on the Done button you transfer the keyboardFocus to a different
editable sprite off-stage:
-- Done button
on mouseUp
the keyboardFocusSprite = sprite("Off-stage editable").spriteNum
end
This means that the user can no longer type into the on-stage text member.
If the member in the off-stage sprite has its .autotab property set to
FALSE, the only way the user can start typing into the on-stage text member
again is to click on it.
If you have a number of editable on-stage members whose .autotab property
you want to keep as TRUE, then you might find that this workaround becomes
very complex. In this case, the user could use the Tab key to return to the
member that you want to force him to click on. You would have to override
the autotab feature so that you can manually skip returning to the
'non-editable' sprite.
Does this help?
James
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]