blockly > FieldImage > setOnClickHandler
طريقة FieldImage.setOnClickHandler()
قم بتعيين الدالة المطلوبة عند النقر فوق هذه الصورة.
Signature:
setOnClickHandler(func: ((p1: FieldImage) => void) | null): void;
المعلمات
المعلمة |
النوع |
الوصف |
func |
((p1: FieldImage) => الْفراغ) | فارغ |
الدالة التي يتم استدعاؤها عند النقر على الصورة، أو القيمة الفارغة للإزالة. |
المرتجعات:
فراغ
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `setOnClickHandler` method allows you to assign a function that will be executed when the FieldImage is clicked."],["This function can be set to `null` to remove any existing click handler."],["The assigned function receives the FieldImage instance as an argument when invoked."]]],["The `setOnClickHandler` method within the `FieldImage` class sets a function to be executed when an image is clicked. It accepts a single parameter, `func`, which can be a function taking a `FieldImage` object as input or `null` to remove any existing click handler. This method has no return value. The provided function is activated upon a user clicking the associated image within the interface.\n"]]