[dali_1.4.26] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / text-auto-scrolling.md
1 <!--
2 /**-->
3
4 # Text auto scrolling {#text-auto-scrolling}
5
6 ## Overview
7
8 Auto TextLabel scrolling enables the text to scroll within the control, it can be used if text exceeds the boundary of the control hence showing the full content.
9 It will also scroll text that is smaller than the control and ensure the same bit of text is not visible at the same time, this gap can be configured to be larger.
10
11 If the number of loops (repetitions) is not set then once triggered to start it will scroll until requested to stop.
12 If loop count is set to 3 for example it will scroll the text 3 times.
13
14 ![ ](AutoScroll.gif)
15
16 ### Usage
17
18 At version 1.1.35 auto scrolling is only supported in single line, multiline text will not scroll and Text should be BEGIN aligned.
19
20 The ENABLE_AUTO_SCROLL property should be set to TRUE to enable scrolling.
21
22 The scroll speed, gap and loop count can be set in the stylesheet or provided by Dali::Handle::SetProperty. See the description of each below.
23
24 Once enabled it will start scrolling until the loop count is completed or the ENABLE_AUTO_SCROLL set to false, setting ENABLE_AUTO_SCROLL to false will let the
25 text complete it's current scrolling loop then stop.
26
27 ## The additional properties below can be set to customize the scrolling behaviour
28
29 #### AUTO_SCROLL_SPEED
30
31 This controls the speed of the scrolling, the speed should be provided as pixels/second.
32
33 #### AUTO_SCROLL_LOOP_COUNT
34
35 This specifies how many times the text will complete a full scroll cycle.
36 If not set then it will keep scrolling until ENABLE_AUTO_SCROLL is set to false.
37
38 Setting ENABLE_AUTO_SCROLL to false will stop scrolling whilst still maintaining the original loop count value for when it is next started.
39
40 #### AUTO_SCROLL_GAP
41
42 This specifies the amount of whitespace to display before the scrolling text is shown again.
43
44 This will be increased if the given value is not large enough to prevent the same bit of text being visible at two locations in the control.
45
46 Provide the distance in pixels.
47
48 ### Scroll Direction
49
50 The scroll direction is chosen automatically with the following rules:
51
52 If the text is single-lined it will scroll left when the text is Left to Right (LTR) or scroll right if text is Right to Left (RTL).
53
54 If the text is multi-lined it will scroll upwards. ( Not supported at 1.1.35 )
55
56 ### Text Label Scrolling Properties
57
58 The properties used by TextLabel for Auto Scrolling are listed [here](@ref TextLabelProperties)
59
60
61 */