AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Contents · Computing

The Label object

Lessons 43–44 · 2 lessons · N. I. Taylaqov (general editor), A. B. Akhmedov, M. D. Pardayeva, A. A. Abdug‘aniyev, U. M. Mirsanov. Informatics and Information Technologies, Grade 10, 1st edition. “Extremum-Press”, Tashkent, 2017
44

Practical lesson

Textbook: p. 98
GoalCreates applications in which size, font and colour are controlled with Labels and buttons, and checks the result by calculation.
New words
Font.Size: the size of the text · Font.SizeFont.Color: the colour of the text · Font.ColorLeft and Top: the position of an object · Left va Topinitial value: the value an object has before any action · boshlang‘ich qiymat
Explanation

In the practical lesson the “Font workshop” application is created: five Labels on the window with Font.Size values 10, 14, 18, 22 and 26, and one button. When the button is pressed each text grows by 3, and the last Label shows the text sizes. Change the colour of each Label with Font.Color in the Object Inspector and arrange them in a row by increasing Left. Then a second button returns the texts to the starting size. Before running the application each time, calculate the expected numbers by hand. Colour and font make an application attractive, but a text that is too small or the same colour as the background is hard to read: make sure it is easy to read.

💡 Where will I use this?
In real life

A club made a poster for the corridor notice board. The text was small and pale yellow, so it could not be read from three steps away. After the letters were enlarged and changed to a dark colour, everybody could read the poster.

Who uses it

Designers, sign makers and app interface creators choose text size and colour so it is easy to read; this especially helps people with weak eyesight.

Try it today

Write one word three times on paper in different sizes and colours and test which one is easiest to read from three steps away.

Worked examples
At the start: 10, 14, 18, 22, 26
Clicks123
Sizes of Labels 1–513, 17, 21, 25, 2916, 20, 24, 28, 3219, 23, 27, 31, 35
The starting sizes are 10, 14, 18, 22, 26. After one click: 13, 17, 21, 25, 29; their sum is 13+17+21+25+29 = 105. After three clicks each has grown by 9: 19, 23, 27, 31, 35.
Placing the Labels: the first has Left = 20 and each next is 60 pixels further right. The fifth has Left = 20+4·60 = 260. If the window width is 300, the fifth text will not fit and will be cut off: the window must be widened or the gap reduced.
Class activity

“The readability test”: a group looks at the application from the back row of the class, judges which size and colour are easy to read and writes 3 recommendations.

Practice
1
What is Left for the fifth Label (first 20, step 60)?
2
If the sizes are 10, 14, 18, what is the sum after one +3?
3
What can be done to return the text to its starting size?
4
Why should the text colour not be close to the background colour?
Story of the Week · The Khwarizmi WayDoes the paper reach the Moon?Close the week: all of this week’s subjects in one storyRead →