From: anrxc <an...@hi...> - 2005-11-19 01:11:07
|
Hi, I have a little issue maybe someone can help me out. I created a MultiColumnList and a TextArea. In the MultiColumnList I display a list of files in some directory that contains txt files: def on_initialize(self, event): lista = os.listdir(pkDir) lista.sort() self.components.packs.Append(lista) And upon selecting a file in the list I want to display it's contents in the TextArea: def on_packs_select(self, event): base = self.components redovi = base.packs.getStringSelection() red = redovi[0] os.chdir(pkDir) f = file(red, 'r') for line in f.readlines(): base.descs.text = line So this works, but I only get displayed the last line in the file. If I add "print line" to the end of the function I can see the whole file being printed to my terminal, so why TextArea displays only the last line? Best regards, Adrian C. -- Adrian C. (anrxc) | PGP:0xA8916BBD | xmpp:an...@ja... | ICQ:237982949 |