Editable fields?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Editable fields?

Post by FourthWorld » 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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Editable fields?

Post by dunbarx » Sat May 24, 2025 12:45 am

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

stam
Posts: 3062
Joined: Sun Jun 04, 2006 9:39 pm

Re: Editable fields?

Post by stam » Sat May 24, 2025 1:46 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Editable fields?

Post by FourthWorld » Mon May 26, 2025 7:55 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply