Guest User

Untitled

a guest
Jun 23rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. div = Div(text="<img src='myimg.jpg'>")
  2.  
  3. menu = [("Img 1", "<img src='myimg.jpg'>"),
  4. ("Img 2", "<img src='myimg2.jpg'>")]
  5.  
  6. def handler(attr, old, new):
  7. div.text = new
  8.  
  9. dropdown = DropDown(labels="Images", menu=menu)
  10. dropdown.on_change("value", handler)
Add Comment
Please, Sign In to add comment