How to create a 'locked' text field #31
Answered
by
NoryiE
luiz00martins
asked this question in
Q&A
-
I want to display some text, in a way that the user cannot interact or modify. For example, the code below, this text field is modifiable: main:addTextfield('textfield')
:setPosition(1, 1)
:setSize(20, 1)
:addLine('Value')
:addLine('Another') Minecraft_.1.16.5.-.Singleplayer.2022-10-16.22-35-02.mp4Is there a way to make it unmodifiable by the user? (i.e. display only) |
Beta Was this translation helpful? Give feedback.
Answered by
NoryiE
Oct 17, 2022
Replies: 1 comment
-
Hi, if you don't want the user to modify your text you can use :disable(): If your goal is to disable writing only you could use something like this: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
luiz00martins
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, if you don't want the user to modify your text you can use :disable():
https://basalt.madefor.cc/#/objects/Object/disable
If your goal is to disable writing only you could use something like this:
:onChar(function() return false end)