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 滑块值

        时间:2023-06-06
        <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 应用程序中的一个简单网页作为小部件 下一篇:加载表单后如何运行函数 Kivy

                  相关文章

                    <bdo id='aTLx5'></bdo><ul id='aTLx5'></ul>
                3. <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>
                4. <legend id='aTLx5'><style id='aTLx5'><dir id='aTLx5'><q id='aTLx5'></q></dir></style></legend>