📄 النص الكامل للصفحة
سيؤدي هذا الزر إلى تقليل القيمة الحالية لخاصية FontSize (حجم الخط) لكافة مكونات النص بمقدار نقطة واحدة في كل مرة يتم الضغط عليه.
--- SECTION: لبرمجة زر التصغير ---
لبرمجة زر التصغير
حدد حدث Click (الضغط) لمكون zoomout_button (زر التصغير). 1
كرر نفس العملية السابقة لمكون zoomin_button (زر التكبير)، وغير العملية الحسابية فقط من addition (الجمع) إلى subtraction (الطرح). 2
--- SECTION: شكل 4.9: برمجة زر التصغير ---
شكل 4.9: برمجة زر التصغير
وزارة التعليم
209
Ministry of Education
2025 - 1447
--- VISUAL CONTEXT ---
**DIAGRAM**: MIT APP INVENTOR IDE Screenshot
Description: A screenshot of the MIT App Inventor development environment. The left panel shows the 'Blocks' palette with categories like Lists, Dictionaries, Colors, Variables, Procedures, and components under 'AIMasmak' including discover_label, title_label, description_label, zoomin_button, zoomout_button, map_button. The right panel, labeled 'Viewer', displays several event blocks for 'zoomout_button': Click, GotFocus, LongClick, LostFocus, TouchDown, TouchUp, and a BackgroundColor property block. A blue circle with the number '1' highlights the 'when zoomout_button .Click' event block in the Viewer.
Key Values: MIT APP INVENTOR, Visit_SA_App, Blocks, Viewer, Lists, Dictionaries, Colors, Variables, Procedures, AIMasmak, discover_label, VerticalArrangement1, title_label, image, description_label, HorizontalArrangement, zoomin_button, zoomout_button, map_button, Map1, Any component, Rename, Delete, when zoomout_button .Click, when zoomout_button .GotFocus, when zoomout_button .LongClick, when zoomout_button .LostFocus, when zoomout_button .TouchDown, when zoomout_button .TouchUp, zoomout_button .BackgroundColor
Context: Illustrates the MIT App Inventor interface and the available event blocks for a button component, specifically highlighting the 'Click' event for the 'zoomout_button'.
**DIAGRAM**: when zoomout_button .Click Event Block (Detail)
Description: An isolated code block showing the 'when zoomout_button .Click do' event handler. This block is a zoomed-in representation of the event block highlighted with '1' in the main IDE screenshot.
Key Values: when zoomout_button .Click, do
Context: Emphasizes the specific event block being programmed for the zoom out functionality.
**DIAGRAM**: Zoom Out Button Logic Implementation
Description: A code block showing the internal logic for the 'when zoomout_button .Click' event. It contains three 'set' blocks, each designed to decrease the FontSize property of a different label by 1. The labels are 'discover_label', 'title_label', and 'description_label'. Each 'set' block takes the current FontSize of the respective label and subtracts 1 from it. A blue circle with the number '2' points to the '- 1' operation within these blocks. A dashed line visually connects this implementation block to the event handler block shown above.
Key Values: when zoomout_button .Click, do, set discover_label .FontSize to discover_label .FontSize - 1, set title_label .FontSize to title_label .FontSize - 1, set description_label .FontSize to description_label .FontSize - 1
Context: Demonstrates how to implement the 'zoom out' functionality by decreasing the font size of multiple text labels when the 'zoomout_button' is clicked, using a subtraction operation.
🎴 بطاقات تعليمية للمراجعة
عدد البطاقات: 5 بطاقة لهذه الصفحة
ما هو الغرض من زر التصغير (zoomout_button) في تطبيق MIT App Inventor كما هو موضح في الصفحة؟
الإجابة: يقلل القيمة الحالية لخاصية FontSize (حجم الخط) لكافة مكونات النص بمقدار نقطة واحدة في كل مرة يتم الضغط عليه.
الشرح: يتم برمجة زر التصغير لتنفيذ عملية حسابية تقلل حجم خط النصوص في التطبيق، مما يحسن تجربة المستخدم في التحكم في العرض.
تلميح: فكر في الوظيفة التي يؤديها الزر بناءً على اسمه 'zoomout' وكيف يؤثر على عرض النص.
التصنيف: تعريف | المستوى: سهل
ما الحدث (Event) الذي يجب تحديده لبرمجة زر التصغير لتنفيذ وظيفته عند تفاعل المستخدم؟
الإجابة: حدث Click (الضغط).
الشرح: يعد حدث النقر (Click) هو الحدث الأساسي لمعالجة فعل المستخدم عند الضغط على زر لتنفيذ إجراء.
تلميح: راجع أنواع الأحداث المتاحة لأي مكون زر في بيئة التطوير.
التصنيف: مفهوم جوهري | المستوى: سهل
ما هي الخطوات الأساسية لبرمجة زر التصغير (zoomout_button) مقارنة ببرمجة زر التكبير (zoomin_button) في MIT App Inventor؟
الإجابة: تكرر نفس عملية برمجة زر التكبير، مع تغيير العملية الحسابية فقط من الجمع (addition) إلى الطرح (subtraction).
الشرح: يظهر هذا المبدأ كفاءة في إعادة استخدام المنطق البرمجي مع تعديل بسيط (العملية الحسابية) لتحقيق وظيفة معاكسة.
تلميح: فكر في كيفية تحقيق تأثيرين متعاكسين (تكبير وتصغير) باستخدام عمليتين حسابيتين أساسيتين.
التصنيف: فرق بين مفهومين | المستوى: متوسط
كيف يتم تنفيذ منطق تقليل حجم الخط لثلاثة تسميات (Labels) مختلفة عند النقر على زر التصغير في كتلة البرمجة؟
الإجابة: يتم استخدام ثلاث كتل 'set' منفصلة، كل كتلة تقوم بتعيين خاصية FontSize للتسمية المقابلة (مثل discover_label) إلى قيمتها الحالية مطروحاً منها 1.
الشرح: يجب معالجة كل مكون نصي على حدة لأن لكل منها خاصية FontSize الخاصة به، مما يتطلب تعليمات برمجية منفصلة ولكن متشابهة.
تلميح: تأمل في كيفية تطبيق التغيير نفسه على عدة مكونات واجهة مستخدم في نفس الوقت.
التصنيف: صيغة/خطوات | المستوى: متوسط
ما هي العملية الحسابية المستخدمة داخل كتل 'set' لتنفيذ وظيفة التصغير؟
الإجابة: عملية الطرح (Subtraction)، ممثلة بـ '- 1'.
الشرح: عملية الطرح هي العملية العكسية للجمع المستخدم في زر التكبير، وهي مناسبة لتحقيق تقليل القيمة تدريجياً.
تلميح: انظر إلى العامل الرياضي المستخدم لخفض قيمة حجم الخط.
التصنيف: مفهوم جوهري | المستوى: سهل