Код: Выделить всё
import ipywidgets as widgets
box = widgets.Box(layout=widgets.Layout(width='400px', height='200px'))
button1 = widgets.Button(layout=widgets.Layout(top='30px', left='20px', width='100px', height='30px'), description="Button1")
button2 = widgets.Button(layout=widgets.Layout(top='60px', left='120px', width='100px', height='30px'), description="Button2")
box.children += (button1, button2)
box
Код: Выделить всё
button2 = widgets.Button(layout=widgets.Layout(position="absolute", top='60px', left='120px', width='100px', height='30px'), description="Button2")
Код: Выделить всё
button2.style.position = "absolute"
Подробнее здесь: https://stackoverflow.com/questions/662 ... ipywidgets