ScrollText

                                                         +-10-------+
>>-aButtonControl~ScrollText(--text--,--+----------+--,--+----------+--,------>
                                        +-fontName-+     +-fontSize-+

                                    +-0---------+     +-4----+     +-10----+
>--+--------------------------+--,--+-----------+--,--+------+--,--+-------+-->
   |    +----------------+    |     +-displaceY-+     +-step-+     +-sleep-+
   |    V                |    |
   +-"----+-THIN-------+-+--"-+
          +-EXTRALIGHT-+
          +-LIGHT------+
          +-MEDIUM-----+
          +-SEMIBOLD---+
          +-EXTRABOLD--+
          +-BOLD-------+
          +-HEAVY------+
          +-UNDERLINE--+
          +-ITALIC-----+
          +-STRIKEOUT--+

      +-0-----+
>--,--+-------+--)----------------------------------------------------------><
      +-color-+


The ScrollText method scrolls text in the associated button with the given font, size, and color. The text is scrolled from right to left. If the method is started concurrently, call it a second time to stop scrolling. The associated button must have the OWNERDRAWN style.

Arguments:

The arguments are:

text

A text string that is displayed and scrolled.

fontName

The name of the font used to write the text. If omitted, the system font is used.

fontSize

The size of the font used to write the text. If omitted, the standard size (10) is used.

fontStyle

This argument can be one or more of the keywords listed in the syntax diagram. If you use more than one keyword, put them in one string, separated by blanks.

displaceY

The vertical displacement of the text relative to the top of the client area of the window. The default is 0.

step

The amount of screen pixels that the text is moved in each cycle. The default is 4.

sleep

The time, in milliseconds, that the program waits after each movement to determine the scrolling speed. The default is 10.

color

The color index used for the text. The default is 0, which is black.

Example:

The following example scrolls the string "Hello world!" from left to right within the associated button. The text is located 2 pixels below the top of the client area, one move is 3 screen pixels, and the delay time after each movement is 15 ms.

button = MyDialog~GetButtonControl("IFOK")
if button == .Nil then return
button~ScrollText("Hello world!", "Arial", 36, "BOLD ITALIC", 2, 3, 15, 4)