Welcome Guest (Log in)

SkWrappingField

StarStarStarStarStar
Text (10) | UI (3)
General
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Stam Kapetanakis
  • StarStarStarStarStar
  • Stack
  • 2
  • 32 Times
  • 16 August 2022
Character level wrapping (regardless of spaces) while preserving original text
Updated: moved the scripts for resizing into a separate behavior substack, which can be copied to the topStack. Important to remember to pass resizeStack if already implemented on the card as the behavior is downstream from this.
=======================================
For those long strings with no spaces that won't wrap.
Implemented as a behaviour. Stores the text value as custom prop uText of the field and setting this triggers the wrap and displays wrapped text while storing the original intact in uText.

Also wraps on field re-sizing. If text is > 1024 chars long then the re-wrapping is deferred until after resizing finished, otherwise it's live.

Full acknoledgemnt to Bernd, without whom this wouldn't be remotely as good...

Forum thread:
https://forums.livecode.com/viewtopic.php?f=8&t=37212
Ajax Loader
Tags
Expander triangle
User Comments
Expander triangle