Hi
Just wondering if I am missing a very basic element here… but is there a way to have a nice and simple text display on a Makie.jl
scene?
I’m trying to use Makie to build a very simple user GUI with some buttons to select a file, some plots to display the data and some sliders to play around with some settings.
So far so good, but what I want at some points is a simple display of some text, which is just a display, nothing the user would/should interact with (like, e.g., showing the selected filename after button click or any other information).
fig = Figure(); display(fig);
leftPane = fig[1:2,1] = GridLayout()
rightTopPane = fig[1,2] = GridLayout()
rightBottomPane = fig[2,2] = GridLayout()
ax1 = Axis(rightTopPane[1,1])
ax2 = Axis(rightTopPane[2,1])
ax3 = Axis(rightBottomPane[1,1])
sld = Slider(rightBottomPane[2,1],range=-10:1:10,startvalue=0)
btnOpen = Button(leftPane[1,1],label="Open a file...")
btnDo = Button(leftPane[3,1], label="Do Something!")
btnDoMore = Button(leftPane[4,1],label="Do Something Else!")
txtTest = Textbox(leftPane[2,1],stored_string="This is Text!",tellwidth=false)
I now there is Textbox()
, and from a design point of view it is kind of what I want… but unfortunately it cannot be made readonly (or can it??). The user can always click on it and enter text, although this is supposed to be display only.
Then there is Label()
which is really readonly… but unfortunately it has no style elements to it like background color, borders, etc…
And for both widgets I don’t see how to set a fixed width with simple word wrap for longer text.
I’m wondering, is there another option that I am missing? If not, is this not something that should be added to the Makie framework? Like a TextIndicator()
widget or something…
Because it seems very natural that you want a certain area of your Layout just for displaying some info that might not be directly related to the plots (as in a legend).
Thx!