2

In another thread regarding multi-line text values in Codename One buttons, one of the answers referenced using "ticker mode." In theory, this ought to allow a line of text that is longer than the element's width to scroll across the display area of the element.

I have searched the javadoc and other resources but cannot find any reference to how this is enabled/disabled. OR even if it actually exists.

How does one enable/disable ticker mode for a button, label, or multi-button in CN1? Reference to documentation would be helpful.

Community
  • 1
  • 1
SolStack
  • 394
  • 2
  • 11

1 Answers1

3

try Label.setTickerEnabled(boolean tickerEnabled). Same with all components that extend Label. The documentation is here. There are a couple of other ticker related methods as well.

Yngve Moe
  • 410
  • 2
  • 8
  • There are also some theme constants to configure ticker behavior: https://www.codenameone.com/manual/advanced-theming.html you can also explicitly start tickering using `startTicker`. – Shai Almog Sep 16 '16 at 05:15
  • Thanks for the info. I feel a bit dumb now. I did a lot of googling and didn't find that anywhere. Googled "setTickerEnabled" and "codename one ticker" and now it pops up everywhere. Although I still don't see any ticker methods for the multi-button. Is it not supported for that? – SolStack Sep 16 '16 at 06:47
  • The MultiButton is a Container with several Labels in it, so you would have to address the labels individually in order to get the ticker behaviour. I don't see any way to do this, as the labels are all private, except the icon one. – Yngve Moe Sep 16 '16 at 08:22