[wxpython] récupération de texte
Bonsoir,
Voilà, j'ai un souci pour récupérer le contenu d'un TextCtrl. Je vous explique :
J'ai ma classe principale :
Code:
1 2 3 4 5 6 7
| class fenetre(wx.Frame):
[...]
...
self.texte = wx.TextCtrl(self.panel1, 500, "", (15,130), (355, 320),
style = wx.TE_MULTILINE) |
puis plus tard, j'appelle une autre classe pour ouvrir une autre fenêtre :
Code:
1 2 3 4 5 6 7 8 9
|
class APERCU(wx.MiniFrame):
[...]
...
self.boxapercu = wx.TextCtrl(self.panel_miniF, 501, self.texte.GetValue(),
(10,10), (465, 510)) |
Et là, la console m'indique :
Citation:
Traceback (most recent call last):
File "C:\Users\root\Desktop\ApplicationPython\Cryptomai
in apercu1
self.fen2 = APERCU(self, -1, "Aper\xe7u du texte")
File "C:\Users\root\Desktop\ApplicationPython\Cryptomai
in __init__
self.boxapercu = wx.TextCtrl(self.panel_miniF, 501, s
5, 510))
AttributeError: 'APERCU' object has no attribute 'texte'
Comment pourrais je faire, là je bute à fond !
Je vous remercie !