Hi Jens,
Here is a (more or less) simple example, textEntries2 showing how to use a TGCanvas. It is based on $ROOTSYS/tutorials/gui/textEntries.C, allowing to easily compare what is needed to obtain the required behavior. I also added several comments explaining the main differences.
Hope this will help. And if you still have questions, feel free to ask!
Cheers, Bertrand.
textEntries2.C (5.28 KB)