How would one specify the width and height of an interact button, dropdown menu, etc.? I didn’t see anything about this in the Interact docs.
Thanks,
1 Like
I’ve been struggling to figure this out as well. The best I have figured out is that the Interact widgets are WebIO.jl nodes and so accept a style command like they do. See here for some documentation.
An example that seems to work for me is
button("Stop",style=Dict(
:color => "white",
:backgroundColor => "red",
:width => "200px",
:height => "100px",
:fontSize => "3em"
))
which creates a big red STOP button.
Thanks @Jordan_Cluts , that is useful.
How would one go about querying the size of a button though? If I use your example and do,
b = button("Stop",style=Dict(
:color => "white",
:backgroundColor => "red",
:width => "200px",
:height => "100px",
:fontSize => "3em"
))
I would have thought that something along the lines of get(b[:style],"height")
might work, but there is no field style
.
Unfortunately I don’t know, I’m trying to figure this all out as well. It seems to all boil down to WebIO.jl whose documentation leaves something to be desired.