الدكتاتورية
New Member
الاسئلة
واكون شكرتلكم ....
واكون شكرتلكم ....
This question involves two components, TShape (which we refer to as “shapes”) and TComboBoxt (which we refer to as “combo boxes”).
a.Open a new application and save the project. Drop an Image component onto the form (Images to be found under the Additional tab on the Component Palette). Double click on the image zone and choose one of the images saved on your computer then load it to the Image component. Use the Object Inspector, the Help system and experiment as necessary, to discover the information required to answer the following questions about images:
i. By default, the image dropped onto the form is positioned at the top left corner of the image component. In the Object Inspector, which property would you change, and to what value, so as to position the image at the center of the frame?
ii. What do you understand by the “AutoSize” property and what do the the values “true” or “false” mean?
iii. Explain briefly what you understand by the property “Stretch” ? What changes can be made if you set its value to true?
iv. Which event(s) of an image do occur when the user clicks the mouse button while on the image?
As an intermediate step to your final program, you might like to write a program at this stage, with the following specification. Drop three images onto the form. Now drop three buttons onto the form and give them the captions “SeeImage1”, “SeeImage2” and “SeeImage3”. Write code so that when any of the buttons is clicked the corresponding image appears and the two other images disappear.
All that remains is to replace the three buttons by a combo box. You may wish to open a new application to continue your experimentation.
b.Drop a TComboBox component onto the form. By default its Style property should be set to csDropDown and you are not asked to explore any other styles.
i. Explain briefly what you understand by Items property of a combo box. How do you envisage using the Items property of the combo box in the wanted program?
ii. Combo boxes have a property ItemIndex which does not appear in the Object Inspector. What do you understand by this property?
iii. An event occurs whenever a new selection is made from the combo box. Which event is it?
c.Write the program, which has the following specification.From a combo box, you should be able to choose from three images and whichever selection is made the corresponding image alone should appear, also, you need to add an option to show all images
a.Open a new application and save the project. Drop an Image component onto the form (Images to be found under the Additional tab on the Component Palette). Double click on the image zone and choose one of the images saved on your computer then load it to the Image component. Use the Object Inspector, the Help system and experiment as necessary, to discover the information required to answer the following questions about images:
i. By default, the image dropped onto the form is positioned at the top left corner of the image component. In the Object Inspector, which property would you change, and to what value, so as to position the image at the center of the frame?
ii. What do you understand by the “AutoSize” property and what do the the values “true” or “false” mean?
iii. Explain briefly what you understand by the property “Stretch” ? What changes can be made if you set its value to true?
iv. Which event(s) of an image do occur when the user clicks the mouse button while on the image?
As an intermediate step to your final program, you might like to write a program at this stage, with the following specification. Drop three images onto the form. Now drop three buttons onto the form and give them the captions “SeeImage1”, “SeeImage2” and “SeeImage3”. Write code so that when any of the buttons is clicked the corresponding image appears and the two other images disappear.
All that remains is to replace the three buttons by a combo box. You may wish to open a new application to continue your experimentation.
b.Drop a TComboBox component onto the form. By default its Style property should be set to csDropDown and you are not asked to explore any other styles.
i. Explain briefly what you understand by Items property of a combo box. How do you envisage using the Items property of the combo box in the wanted program?
ii. Combo boxes have a property ItemIndex which does not appear in the Object Inspector. What do you understand by this property?
iii. An event occurs whenever a new selection is made from the combo box. Which event is it?
c.Write the program, which has the following specification.From a combo box, you should be able to choose from three images and whichever selection is made the corresponding image alone should appear, also, you need to add an option to show all images
For part (c) you should submit to your tutor a listing of the form’s code file together with the executable version of your final program and the project files.
اتمنى اني ما ثقلت عليكم