Page 1 of 1
Editable fields?
Posted: Fri May 23, 2025 8:25 pm
by FourthWorld
Way back in the early days LCB didn't offer a way to create editable text fields. I'm considering LCB for a new widget, but among the other primitives I'd need is an editable text field. Is that supported these days?
Re: Editable fields?
Posted: Sat May 24, 2025 12:45 am
by dunbarx
Richard.
I have never used LCB, but how is it possible that it does not support (along with buttons) the most important of all controls???
What I mean is, are you sure it does not?. Have you asked Scotland?
Craig
Re: Editable fields?
Posted: Sat May 24, 2025 1:46 pm
by stam
FourthWorld wrote: ↑Fri May 23, 2025 8:25 pm
Way back in the early days LCB didn't offer a way to create editable text fields. I'm considering LCB for a new widget, but among the other primitives I'd need is an editable text field. Is that supported these days?
If this isn’t possible with LCB, then consider using
script widgets instead (requires LC 10 DP5 or above to create and also run the widget). I dabbled and shared a tristate switch widget, the source code is freely available on GitHub - could possibly be of help:
https://github.com/stam66/tristate
This might also be of help:
https://lessons.livecode.com/m/98525/l/ ... ipt-widget
While it is still a lot of work, at least it is entirely in LiveCodeScript…
Main downside is that the widget will not run on LC versions below v10 DP5
Re: Editable fields?
Posted: Mon May 26, 2025 7:55 pm
by FourthWorld
Thank you for that reminder, Stam. It's good to see them pick up where they left of on the foundational work we first saw hinted at with the language features added for the DataGrid.
The LC field object is quite an accomplishment, among the better text engines I've seen, certainly the most feature-rich of any xTalk I've worked with.
The only alternative I could envision might be to rely on an embedded browser engine, like many of the LCB widgets do. It would seem impractical to attempt to recreate the LC field object for LCB.
Script Widgets are a good solution, leveraging the engine's proven controls with just enough new wrapping to allow these groups easier encapsulatization and portability.