将滚动条放在“散景"下拉选项上 [英] put scroll on Bokeh Dropdown choices

查看:55
本文介绍了将滚动条放在“散景"下拉选项上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在有很多选项的情况下,是否可以将滚动显示用于Bokeh下拉菜单?例如,在下图中,我希望一次具有5个选项,并在需要时能够向下滚动到其他选项.如果您可以提供一个可行的示例,那就太好了.这是一个下拉菜单示例.

Is it possible to put scroll for Bokeh dropdown when there are many options? For example, in the following image, I would like to have 5 options at a time, and be able to scroll down to other options when needed. That would be great if you could provide a working example. Here is a an example for a dropdown.

from bokeh.models import Dropdown

mymenu = [(str(i), str(i)) for i in range(1, 10)]

dd = Dropdown(label="DropDown Label",
                     button_type="warning", menu=mymenu, width=150)

show(ddmsn)

我尝试为DropDown设置高度,但似乎只考虑了标签的高度.

I tried putting a height for the DropDown but it seems it only takes into account the height of the label.

推荐答案

尝试使用Select代替DropDown

Try using Select instead of DropDown

这篇关于将滚动条放在“散景"下拉选项上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆