Bonsoir,
J'ai enfin réussi à installer la librairie xwinforms dans xna, cependant je n'arrive pas à afficher une textbox dans ma fenêtre xna,
j'ai ajouté le bref,
je déclare un objet de type textbox
Textbox tx = new Textbox("bibi", new Vector2(0, 0), 30, 30, "test");
dans Initialize()
J'ajoute la ligne suivante:
enfin dans le Draw:
J'ai écrit tx.Draw(spriteBatch), j'utilise la méthode Draw qui prend en paramétre un objet de type spriteBatch, jusqu'ici tout me semble correct mais lorsque je compile une erreur sur la ligne tx.Draw(spriteBatch) m'ai signalé;, je ne comprends pas?
erreur :
Object reference not set to an instance of an object.
pourtant j'ai l'objet instancié l'objet textbox en haut ?
Pourriez vous m'aider s'il vous plait; Merci beaucoup
PS : Fabiani en ce qui concerne Neoforce, je ne l'ai pas encore installé car j'espère m'en sortir avec xwinform pour l'instant. En ce qui concerne le chargement d'un objet je crains le même problème qu'avec la librairie xwinform, en tout cas Merci;
Partager