+-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.
The arguments are:
A text string that is displayed and scrolled.
The name of the font used to write the text. If omitted, the system font is used.
The size of the font used to write the text. If omitted, the standard size (10) is used.
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.
The vertical displacement of the text relative to the top of the client area of the window. The default is 0.
The amount of screen pixels that the text is moved in each cycle. The default is 4.
The time, in milliseconds, that the program waits after each movement to determine the scrolling speed. The default is 10.
The color index used for the text. The default is 0, which is black.
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)