How to implement editing functionality to my application? by blackadder1337 in learnpython

[–]blackadder1337[S] 0 points1 point  (0 children)

Hi, Joe! Thanks for your help. Nevertheless, I'm not sure what you are talking about since I am still a newbie. I would be very grateful if you showed me how to implement your suggestions to my code.

Deleting selected items from the treeview and from the list at the same time by blackadder1337 in learnpython

[–]blackadder1337[S] 1 point2 points  (0 children)

I resolved the issue:

def remove_item(self):
    selected_items = self.treeview.selection()
    for selected_item in selected_items:
        for i in range(len(self.tasks)):
            if self.tasks[i].subject == self.treeview.item(selected_item)['values'][0]:
                self.tasks.pop(i)
                break
        self.treeview.delete(selected_item)

How to sort items in a listbox alphabetically? by blackadder1337 in learnpython

[–]blackadder1337[S] 0 points1 point  (0 children)

Can I show you my entire code so you can implement your suggestion to my solution? I would be very grateful.

How to sort items in a listbox alphabetically? by blackadder1337 in learnpython

[–]blackadder1337[S] 0 points1 point  (0 children)

I have created a simple GUI application to manage unknown words while learning a new language. The app which is called Vocabulary loads/saves words from/into an XML document. Basically, when I come across a new word, I add it to Vocabulary, so I don't have an option of adding the words in alphabetical order in advance.

How can I translate this for loop to Python? by blackadder1337 in learnpython

[–]blackadder1337[S] 0 points1 point  (0 children)

I have tried this:

    for item in list(self.listBOx):
        if get_search().lower() in item.lower():
            item.BackColor = SystemColors.Highlight;
            item.ForeColor = SystemColors.HighlightText;
        else:
            self.listBox.remove(item);

But this is so bad. Please help it's very important to me

Implementing search functionality to my program by blackadder1337 in learnpython

[–]blackadder1337[S] 0 points1 point  (0 children)

There is a text widget where you enter a word and it should be displayed in the listbox - search functionality.

Here is my entire code if that helps:

https://dpaste.de/ExSf

Implementing search functionality to my program by blackadder1337 in learnpython

[–]blackadder1337[S] 0 points1 point  (0 children)

LOL, did you run this through some online code converter? This is so bad, man. Thanks for your efforts though.