Nifty - creating drawable canvas as part of the GUI

I’m having sort-of-same problem here:

Theoretical you can create a texture2D and exchange this new image for an old in nifty (see code in my question).
Sadly my solution only works in simpleInitApp() so far.

Let’s keep fingers pressed, some nifty-folks have a more generally working answer.