Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- div = Div(text="<img src='myimg.jpg'>")
- menu = [("Img 1", "<img src='myimg.jpg'>"),
- ("Img 2", "<img src='myimg2.jpg'>")]
- def handler(attr, old, new):
- div.text = new
- dropdown = DropDown(labels="Images", menu=menu)
- dropdown.on_change("value", handler)
Add Comment
Please, Sign In to add comment