ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
ui.Button.onClick
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি কলব্যাক নিবন্ধন করে যা বোতামটি ক্লিক করার সময় বহিস্কার করা হয়।
একটি আইডি ফেরত দেয় যা কলব্যাক নিবন্ধনমুক্ত করতে unlisten() এ পাস করা যেতে পারে।
ব্যবহার | রিটার্নস | Button. onClick (callback) | স্ট্রিং |
যুক্তি | টাইপ | বিস্তারিত | এই: ui.button | ui.বোতাম | ui.Button উদাহরণ। |
callback | ফাংশন | বোতামটি ক্লিক করলে কলব্যাক ফায়ার। কলব্যাক বোতাম উইজেট পাস হয়. |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe \u003ccode\u003eonClick\u003c/code\u003e method registers a callback function that executes when the button is clicked.\u003c/p\u003e\n"],["\u003cp\u003eIt returns a unique ID that can be used with \u003ccode\u003eunlisten()\u003c/code\u003e to remove the registered callback.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the button widget as an argument when triggered.\u003c/p\u003e\n"]]],["The `Button.onClick` method registers a callback function to be executed upon a button click. It accepts a function as an argument, which will be passed the button widget when triggered. The method returns a unique string ID, used to unregister the callback later via `unlisten()`. The function callback is associated with the specific `ui.Button` instance where `onClick` is used.\n"],null,["# ui.Button.onClick\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when the button is clicked.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|----------------------------|---------|\n| Button.onClick`(callback)` | String |\n\n| Argument | Type | Details |\n|-------------------|-----------|--------------------------------------------------------------------------------------------|\n| this: `ui.button` | ui.Button | The ui.Button instance. |\n| `callback` | Function | The callback to fire when the button is clicked. The callback is passed the button widget. |"]]