滑块的移动调用名为fct的回调来改变显示的颜色条的长度,那个回调会调用ProgressBar的value函数来设置新的长度。
Moving the slider changes the length of the displayed color bar by invoking the callback named FCT, which calls the value function on the ProgressBars to set the new length.
清单6显示的是小部件样例的事件处理函数和回调函数。
Listing 6 shows the event handlers and the callback function of the sample widget.
如果注册了一个路径,它就使用定义的回调函数来生成要显示的内容。
If a path is registered, it USES the defined function as a callback to produce the content presented.
应用推荐