Snippets

Joris Geessels dozb7: Untitled snippet

Created by Joris Geessels
import ipkiss3.all as i3
from ipkiss3.core.properties.containers.typed_list import TypedListProperty
from ipkiss3.pcell.cell.view import ViewList

class ViewListProperty(TypedListProperty):
    _list_type = ViewList
    
class Test(i3.PCell):
    views = ViewListProperty()
 
# the regular list will be converted into a ViewList
Test(views=[])

# let us try with a layout view 
class MyCell(i3.PCell):
    class Layout(i3.LayoutView):
        pass
        
lv = MyCell().Layout()
Test(views=[lv])

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.