Makie textbox. how to disable?

is there a way to prevent a user from entering a string into a textbox? i’d like to be able to disable and enable a text box depending on the state of a menu. in bokeh for example the textbox is greyed out when disabled and the user can not type into it. how to achieve that in makie? none of the attributes seem to be relevant:

help?> Textbox
search: Textbox

  Textbox <: Block

  Attributes

  (type ?Textbox.x in the REPL for more information about attribute x)

  alignmode, bordercolor, bordercolor_focused, bordercolor_focused_invalid, bordercolor_hover,
  borderwidth, boxcolor, boxcolor_focused, boxcolor_focused_invalid, boxcolor_hover,
  cornerradius, cornersegments, cursorcolor, defocus_on_submit, displayed_string, focused,
  font, fontsize, halign, height, placeholder, reset_on_defocus, restriction, stored_string,
  tellheight, tellwidth, textcolor, textcolor_placeholder, textpadding, validator, valign,
  width

That would be a nice addition, maybe someone wants to try opening a PR? None of the GUI elements in Makie have disabled states currently

I needed the same functionality and ended up doing this by creating functions that take the input and always returns false or always return true. If you set the textbox.restriction to the function you need and it will effectively enable or disable user input.

using GLMakie
function RestrictTest_nothing(inputchar)::Bool
    println("res test nothing")
    return false
end

function RestrictTest_anything(inputchar)::Bool
    println("res test any")
    return true
end

fig = Figure(resolution=(500, 500));display(fig)
atextbox =  Textbox(fig,restriction=RestrictTest_nothing)
Makie.set!(atextbox,"a string1")
#   at this point you can't enter anything into the textbox
atextbox.restriction = RestrictTest_anything
# now you can enter anything