ui.Slider.onSlide
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک تماس برگشتی را ثبت می کند که با تغییر وضعیت لغزنده فعال می شود. هنگامی که کاربر در حال کشیدن نوار لغزنده است، تماس برگشتی به طور مکرر فراخوانی می شود.
شناسهای را برمیگرداند که میتوان آن را به unlisten() برای لغو ثبت تماس برگشت داد.
استفاده | برمی گرداند | Slider. onSlide (callback) | رشته |
استدلال | تایپ کنید | جزئیات | این: ui.slider | ui.Slider | نمونه ui.Slider. |
callback | تابع | زمانی که حالت لغزنده تغییر می کند، تماس مجدد برای شروع به کار. تماس برگشتی به مقدار فعلی اسلایدر منتقل می شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eSlider.onSlide\u003c/code\u003e registers a callback function that is triggered repeatedly as the user interacts with the slider, providing real-time updates on the slider's value.\u003c/p\u003e\n"],["\u003cp\u003eThis function returns a unique ID that can be used with \u003ccode\u003eunlisten()\u003c/code\u003e to remove the registered callback when it's no longer needed.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the current value of the slider as an argument, allowing you to perform actions based on the slider's state.\u003c/p\u003e\n"]]],["Registers a callback function triggered by slider state changes, particularly during user dragging. The `onSlide` method accepts a callback function as an argument, which receives the slider's current value. It returns a unique ID used to unregister the callback later with `unlisten()`. The method is used on a `ui.Slider` instance and allows repeated invocation of the callback while the slider state changes.\n"],null,["# ui.Slider.onSlide\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when the slider's state changes. The callback will be invoked repeatedly while the user is dragging the slider.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|----------------------------|---------|\n| Slider.onSlide`(callback)` | String |\n\n| Argument | Type | Details |\n|-------------------|-----------|----------------------------------------------------------------------------------------------------------|\n| this: `ui.slider` | ui.Slider | The ui.Slider instance. |\n| `callback` | Function | The callback to fire when the slider's state changes. The callback is passed the slider's current value. |"]]