Tabulator on_click() to load a new page

Hi Andy

if you looking for open a new web page:

try this:

if you look at something replace the current page, you could try:

import panel as pn
pn.extension()

# first page
app = pn.Row(pn.Spacer(background = 'red',height = 200,width = 200))
# second page 
app2 = pn.Row(pn.Spacer(background = 'blue',height = 200,width = 200))

# define a button and click function
button = pn.widgets.Button(name = 'cilck me')
def click_function(event):
    app.clear()
    app.append(app2)
button.on_click(click_function)
#'layout    
pn.Column(app,button)

hopefully this could help you :grinning:

Kind regadrs
Victor

1 Like