1. <i id='ZQv2u'><tr id='ZQv2u'><dt id='ZQv2u'><q id='ZQv2u'><span id='ZQv2u'><b id='ZQv2u'><form id='ZQv2u'><ins id='ZQv2u'></ins><ul id='ZQv2u'></ul><sub id='ZQv2u'></sub></form><legend id='ZQv2u'></legend><bdo id='ZQv2u'><pre id='ZQv2u'><center id='ZQv2u'></center></pre></bdo></b><th id='ZQv2u'></th></span></q></dt></tr></i><div id='ZQv2u'><tfoot id='ZQv2u'></tfoot><dl id='ZQv2u'><fieldset id='ZQv2u'></fieldset></dl></div>

      <tfoot id='ZQv2u'></tfoot>
      <legend id='ZQv2u'><style id='ZQv2u'><dir id='ZQv2u'><q id='ZQv2u'></q></dir></style></legend>
        <bdo id='ZQv2u'></bdo><ul id='ZQv2u'></ul>

      1. <small id='ZQv2u'></small><noframes id='ZQv2u'>

        在更改时显示 kivy 滑块值

        Display kivy slider value as it changes(在更改时显示 kivy 滑块值)
        <legend id='PEEFE'><style id='PEEFE'><dir id='PEEFE'><q id='PEEFE'></q></dir></style></legend>

          • <bdo id='PEEFE'></bdo><ul id='PEEFE'></ul>
                <tfoot id='PEEFE'></tfoot>
                1. <i id='PEEFE'><tr id='PEEFE'><dt id='PEEFE'><q id='PEEFE'><span id='PEEFE'><b id='PEEFE'><form id='PEEFE'><ins id='PEEFE'></ins><ul id='PEEFE'></ul><sub id='PEEFE'></sub></form><legend id='PEEFE'></legend><bdo id='PEEFE'><pre id='PEEFE'><center id='PEEFE'></center></pre></bdo></b><th id='PEEFE'></th></span></q></dt></tr></i><div id='PEEFE'><tfoot id='PEEFE'></tfoot><dl id='PEEFE'><fieldset id='PEEFE'></fieldset></dl></div>

                  <small id='PEEFE'></small><noframes id='PEEFE'>

                    <tbody id='PEEFE'></tbody>
                2. 本文介绍了在更改时显示 kivy 滑块值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想知道是否可以将 kivy 微调器值显示为移动标签,以便用户确切知道滑块的当前值是什么.

                  I was wondering whether it was possible to displays kivy spinner values as a moving label, so that the user knows exactly what the current value of the slider is.

                  谢谢

                  推荐答案

                  你只需绑定一个监听器到值改变事件

                  you just bind a listener to the value change event

                  some_label = Label(...)
                  my_slider = Slider(...)
                  def OnSliderValueChange(instance,value):
                      some_label.text = str(value)
                  
                  my_slider.bind(value=OnSliderValueChange)
                  

                  正如 .kv 文件中指出的那样,您可以执行类似的操作

                  as inclement points out in the .kv file you could do something like

                  <PongGame>:
                      ...
                      canvas:
                          Rectangle:
                              ...
                      Label:
                          ...
                          text: str(slider_id.value)
                       Slider:
                          ...
                          id: slider_id
                  

                  这篇关于在更改时显示 kivy 滑块值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                    <tbody id='aTLx5'></tbody>

                        <bdo id='aTLx5'></bdo><ul id='aTLx5'></ul>
                      • <tfoot id='aTLx5'></tfoot>

                        <small id='aTLx5'></small><noframes id='aTLx5'>

                        <i id='aTLx5'><tr id='aTLx5'><dt id='aTLx5'><q id='aTLx5'><span id='aTLx5'><b id='aTLx5'><form id='aTLx5'><ins id='aTLx5'></ins><ul id='aTLx5'></ul><sub id='aTLx5'></sub></form><legend id='aTLx5'></legend><bdo id='aTLx5'><pre id='aTLx5'><center id='aTLx5'></center></pre></bdo></b><th id='aTLx5'></th></span></q></dt></tr></i><div id='aTLx5'><tfoot id='aTLx5'></tfoot><dl id='aTLx5'><fieldset id='aTLx5'></fieldset></dl></div>
                      • <legend id='aTLx5'><style id='aTLx5'><dir id='aTLx5'><q id='aTLx5'></q></dir></style></legend>