I have written a GUI library that has forms(windows), textboxes,
checkboxes, radiobuttons, picture boxes, lables, dialog boxes and an
early beta of a tabcontrol. The tabcontrol works prety well tho
go here:
http://www.ticalc.org/archives/files/fileinfo/444/44428.html
On Apr 9, 10:21 pm, Dennis Donovan <
ddha...@yahoo.com> wrote:
> Hi,
>
> I've been learning Lua by creating a Quadratic Equation Solver using the quadratic formula. I initially though that I would create a class that was an input box and then take the character input and send it to math.eval() to get a numerical value for a, b and c.
>
> I then found D2Editor and began using that, but the editor acts differently than the rest of the "gc" content (at least it seems so to me). I thought I'd be able to overlay the text editor on my input box, then once the user clicked outside the input box region, I could remove the text editor and reveal the numerical value in the input box area that was below. Then if the user clicked back into the input box region, a text editor populated with the current value converted to text would be overlay the region again.
>
> Am I missing something or is there no way to remove the text editors from the page once they are there? I have attached both a .tns and my Lua code (it's a bit messy, since there is still some test code commented out). Thanks to Marc Garneau for the code bits regarding classes to get me going)
>
> Also, when you are editing text, the on.char(), etc. routines don't seem to be called as outlined in the wiki athttp://
wiki.inspired-lua.org/D2Editor.newRichText
>
> Any help with the API for the text editor would be greatly appreciated.
>
> Thanks.
>
> Dennis Donovan
>
> QuadraticFormula.lua
> 11KViewDownload
>
> QuadForm.tns
> 6KViewDownload