☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

In a bokeh.models.Dialog, how to set the top_limit, right_limit, etc

Community Supportbokeh
gpn
gpn

I am using a “bokeh.models.Dialog” and it works. Thanks, appreciated.

I am trying to control where it opens up in my HTML page. I tried to use the properties top_limit, bottom_limit, right_limit, left_limit- but couldn’t make them work.

What am I trying to do?

Open a Dialog so it takes up a desired percentage of the web page, with 10% margin above and below, and 20% margin on the right and left. By “10%”, “20%” - I mean percentage of the web page size.

If percentages are not available in bokeh, I could work with pixel sizes.

What have you tried that did NOT work as expected?

I tried setting the right_limit relative to the ‘viewport’, the ‘frame’ and the ‘canvas’; this either had no effect or (in the ‘viewport’ case) the Dialog simply did not show up. For example:

import bokeh.models as bk
bk.Dialog(content=column(children=[
            something_bokeh,
            row(
                cancel_button,
                OK_button,
                sizing_mode='stretch_width',
            )]),
            right_limit=bk.Node(target='viewport', symbol='left', offset=100),
            stylesheets=[f'''
                         :host {{
                            max-width: {700};
                        }}
                         '''],
        )

Thank you

GPN

⌁   Link to post

End of archived discussion · Replies are disabled