📄 النص الكامل للصفحة
برمجة زر التكبير Zoom In Button
سيقوم هذا الزر بزيادة القيمة الحالية لخاصية FontSize (حجم الخط) لكافة مكونات النص بمقدار نقطة واحدة في كل مرة يتم الضغط عليه.
--- SECTION: لبرمجة زر التكبير ---
لبرمجة زر التكبير
١. حدد حدث Click (الضغط) لمكون zoomin_button (زر_التكبير).
٢. حدد الأمر Set FontSize (ضبط حجم الخط) للمكون discover_label (اكتشف_التسمية).
٣. حدد لبنة Addition (الجمع) من مجموعة أوامر Math (الحساب).
٤. أضف القيمة 1 إلى خاصية FontSize (حجم الخط) الموجودة لمكون discover_label (اكتشف_التسمية).
٥. كرر العملية نفسها لمكونات النص المتبقية على الشاشة.
وزارة التعليم
Ministry of Education
2023 - 1447
206
--- VISUAL CONTEXT ---
**FIGURE**: App Inventor Blocks Editor - Zoom In Button Events
Description: A screenshot of the MIT App Inventor Blocks editor. The top-left corner shows 'MIT APP INVENTOR'. The top bar includes 'Projects', 'Connect', 'Build', 'Settings', 'Help'. Below that, 'Visit_SA_App' is visible. The left panel, labeled 'Blocks', lists various components and categories: 'Text', 'Lists', 'Dictionaries', 'Colors', 'Variables', 'Procedures', 'AlMasmak', 'A discover_label', 'VerticalArrangement1', 'ATitle_label', 'image', 'A description_label', 'HorizontalArrangement1', 'zoomin_button', 'map_button', and 'Map1', followed by 'Any component'. The main viewer area displays several event blocks for 'zoomin_button': 'when zoomin_button .Click do', 'when zoomin_button .GotFocus do', 'when zoomin_button .LongClick do', 'when zoomin_button .LostFocus do', 'when zoomin_button .TouchDown do', and 'when zoomin_button .TouchUp do'. A blue circle with the number '1' highlights the 'when zoomin_button .Click do' block, indicating it's the first step in the programming instructions.
Key Values: zoomin_button, Click, GotFocus, LongClick, LostFocus, TouchDown, TouchUp, discover_label, map_button
Context: This visual demonstrates the available event handlers for the 'zoomin_button' component in MIT App Inventor, specifically highlighting the 'Click' event as the starting point for the zoom functionality.
**FIGURE**: Zoomed-in 'Click' Event Block
Description: A zoomed-in view of the 'when zoomin_button .Click do' block, which is highlighted as step 1 in the larger screenshot. This block represents the event handler that will execute code when the 'zoomin_button' is clicked.
Key Values: zoomin_button, Click
Context: This visual emphasizes the specific 'Click' event block, which is crucial for initiating the font size change when the button is pressed.
**FIGURE**: App Inventor Blocks Editor - discover_label Properties
Description: A second screenshot of the MIT App Inventor Blocks editor. The top-left corner shows 'MIT APP INVENTOR'. The top bar includes 'Projects', 'Connect', 'Build', 'Settings', 'Help'. Below that, 'Visit_SA_App' is visible. The left panel, labeled 'Blocks', lists various components and categories. The main viewer area displays several property blocks for 'discover_label': 'discover_label .BackgroundColor', 'set discover_label .BackgroundColor to', 'discover_label .FontSize', 'set discover_label .FontSize to', 'discover_label .HTMLContent', 'discover_label .HasMargins', 'set discover_label .HasMargins to', and 'discover_label .Height'. A blue circle with the number '2' highlights the 'set discover_label .FontSize to' block, indicating it's the second step in the programming instructions.
Key Values: discover_label, FontSize, BackgroundColor, HTMLContent, HasMargins, Height
Context: This visual shows how to access and modify properties of the 'discover_label' component, specifically highlighting the 'set FontSize' block which is used to change the text size.
**FIGURE**: Combined 'Click' Event and 'Set FontSize' Block
Description: A block diagram showing the 'when zoomin_button .Click do' event block connected to the 'set discover_label .FontSize to' property setter block. This illustrates how the font size of 'discover_label' will be modified when the 'zoomin_button' is clicked, as per the programming instructions.
Key Values: zoomin_button, Click, set discover_label, FontSize
Context: This visual demonstrates the logical connection between the button click event and the action of setting the font size, forming a complete programming instruction.
🎴 بطاقات تعليمية للمراجعة
عدد البطاقات: 6 بطاقة لهذه الصفحة
ما هو الغرض من زر التكبير (Zoom In Button) في تطبيق App Inventor كما ورد في الصفحة؟
الإجابة: يقوم هذا الزر بزيادة القيمة الحالية لخاصية FontSize (حجم الخط) لكافة مكونات النص بمقدار نقطة واحدة في كل مرة يتم الضغط عليه.
الشرح: الغرض الأساسي لزر التكبير هو تعديل خاصية مرئية للمكونات النصية لتحسين تجربة المستخدم، وهو ما يتم عبر زيادة حجم الخط تدريجياً.
تلميح: فكر في الإجراء الذي يحدث عند التفاعل مع هذا الزر وكيف يؤثر على مظهر النص.
التصنيف: تعريف | المستوى: سهل
ما هي الخطوة الأولى لبرمجة زر التكبير في App Inventor؟
الإجابة: تحديد حدث Click (الضغط) لمكون zoomin_button (زر_التكبير).
الشرح: يجب ربط منطق البرمجة بحدث محدد يبدأه المستخدم، وفي هذه الحالة هو النقر على الزر.
تلميح: تذكر أن كل إجراء يبدأ باستجابة لتفاعل المستخدم. ما هو التفاعل الأول الذي يجب ربط الكود به؟
التصنيف: صيغة/خطوات | المستوى: سهل
بعد تحديد حدث Click لزر التكبير، ما هو الأمر الذي يجب تحديده لتغيير حجم خط التسمية (discover_label)؟
الإجابة: تحديد الأمر Set FontSize (ضبط حجم الخط) للمكون discover_label (اكتشف_التسمية).
الشرح: لزيادة حجم النص، يجب الوصول إلى الخاصية المسؤولة عن ذلك (FontSize) واستخدام الأمر المناسب لتعيين قيمتها (Set).
تلميح: فكر في اسم الخاصية التي تريد تعديلها لتحقيق تأثير التكبير.
التصنيف: صيغة/خطوات | المستوى: متوسط
كيف يتم حساب القيمة الجديدة لحجم الخط عند الضغط على زر التكبير؟
الإجابة: باستخدام لبنة Addition (الجمع) من مجموعة أوامر Math (الحساب)، حيث تتم إضافة القيمة 1 إلى خاصية FontSize الحالية للمكون.
الشرح: يجب استخدام عملية حسابية لإنشاء قيمة ديناميكية بناءً على القيمة الحالية، مما يضمن زيادة تدريجية وليست ثابتة.
تلميح: تذكر أن الزيادة تكون بمقدار ثابت. ما هي العملية الحسابية المناسبة لإضافة قيمة إلى قيمة موجودة؟
التصنيف: صيغة/خطوات | المستوى: متوسط
ما الذي يجب فعله بعد برمجة تأثير التكبير على مكون discover_label؟
الإجابة: تكرار العملية نفسها لمكونات النص المتبقية على الشاشة.
الشرح: لضمان تجربة مستخدم متجانسة، يجب تطبيق المنطق نفسه على جميع العناصر النصية التي ينبغي أن تتأثر بعملية التكبير.
تلميح: فكر في قابلية التوسع وتجربة المستخدم المتسقة عبر جميع عناصر الواجهة.
التصنيف: مفهوم جوهري | المستوى: سهل
ما هو التسلسل المنطقي الصحيح لخطوات برمجة زر التكبير؟
الإجابة: 1. تحديد حدث Click للزر. 2. تحديد أمر Set FontSize للمكون النصي. 3. استخدام لبنة الجمع. 4. إضافة القيمة 1 إلى خاصية FontSize الحالية. 5. تكرار الخطوات للمكونات النصية الأخرى.
الشرح: يمثل هذا التسلسل منهجية برمجة سليمة: البدء بالمحفز (الحدث)، ثم تنفيذ الإجراء على كائن معين، ثم حساب القيمة الجديدة، وأخيراً تطبيق الحل على جميع الكائنات المشابهة.
تلميح: رتب الخطوات بدءاً من تفاعل المستخدم، ثم الإجراء المطلوب، ثم كيفية حساب القيمة الجديدة، وأخيراً تعميم الحل.
التصنيف: صيغة/خطوات | المستوى: صعب