What is the Xojo Canvas based on?

“ The Text Input Canvas (TIC) plugin from Xojo is the only way to get proper text handling in a Canvas class. In reality, the move to Cocoa from Carbon really messed a good thing up. The old canvas text handling was easy but since Cocoa has so many buzzers and bells there was no way that Xojo could retrofit what it needed into the control. Voila! The Text Input Canvas Plugin was born out of necessity.”

So I’m wondering if the Canvas is now based on the TIC … ?

Isn’t the Text Input Canvas a specialized control to handle …well… Text? as in an “editor”, as opposed to the “Xojo Canvas” which is more aligned with “Drawing”?

What do you consider “messed up”, since I never really noticed any obvious changes to how the “canvas” worked, behaved or responded over the years.

That’s a quote from https://bkeeney.com/text-input-canvas/

And that is my question. If you also do text input on a canvas (eg labels) then I guess you should use the TIC?

Yeah I didn’t notice much in the way of change when they started using the plugin either.

No - Canvas is not based on TIC
TIC is a canvas with extra code for handling text input delegate methods
But its still a canvas
you draw everything yourself - just like every other canvas

The source code is available on Xojo’s GitHub so you can peruse it even if you dont ever modify it

Not that I am aware… For “drawing text”… DrawString works quite well… TIC is for creating a “text editor” like IDE, or Bob’s FTC not for “pictures”

if by text input you mean “keyboard input from users” and want all the fancy things that are possible on macOS (like the popover for special variants of u, i, e, a etc) then yes you should use TIC
but its not trivial to implement all those bits and do them well says the poor sap who rewrote the IDE’s code editor using it not realizing how huge an overhaul it really was :slight_smile:

I think I stick with my input box then, even though it seems somewhat clunky … :confused: