Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ComboBox example?
#1
Hi all - I have to rebuild a little utility I created because my source code was wiped out, and I cannot extract the original script from the .exe I converted it to. The original tool was built using tkinter for the GUI, but I really never liked it, so I wanted to try something else.

After a little reading, I decided to try PYFORMS, but I can't seem to get my hands on a basic example of a form with a populated combo box.

Would any of you have an example of something like that? Something super simple, like a small form with a combo box or two, with any values at all.

Thanks for any guidance.
Quote
#2
I don't know pyforms, so I don't know if this fits with the "flow" of how it works, but I cobbled this together using the "base app" and the docs for the combo control (https://pyforms-gui.readthedocs.io/en/v4...ntrolcombo), and it seems to work:
from pyforms.basewidget import BaseWidget
from pyforms.controls import ControlCombo

class ComboTest(BaseWidget):
    def __init__(self, *args, **kwargs):
        super().__init__('Combo Box example')

        self._combo = ControlCombo()
        items = ["first", "second"]
        for item in items:
            self._combo.add_item(item)

if __name__ == '__main__':
    from pyforms import start_app
    start_app(ComboTest)
JP_ROMANO likes this post
Quote
#3
It does indeed, thank you so much
nilamo likes this post
Quote
#4
Nilamo (or anybody else kind enough to get this far) - since I'm just getting started, and am HORRIBLE at python, do you think PySimpleGUI would be a better approach? I'm wide open to suggestions.

The GUI will basically be 10-12 rows, where each row will have:
A) Text Entry
B) Text Entry 2
C) Combo Box 1
D) Combo Box 2
E) Text Entry 3

All 10-12 ComboBox 1's will have the same options. All 10-12 Combobox 2's will have the same options, which differ from combobox 1
Quote
#5
I normally work with websites, and not guis, so I can't really say. But I do know that there are a few people here who really like PyQT.
JP_ROMANO likes this post
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  combobox value PyQt shift838 9 359 Dec-14-2018, 10:07 PM
Last Post: Axel_Erfurt
  pyqt5 combobox add item with loop shift838 5 198 Dec-09-2018, 08:54 PM
Last Post: shift838
  need help with combobox Python 2.7 ZipSnipe 3 1,050 Feb-04-2018, 05:06 PM
Last Post: Larz60+
  comboBox to list files in a folder? ZipSnipe 3 908 Jan-23-2018, 07:04 PM
Last Post: Larz60+
  [PyQt] Need Help about comboBox and lineEdit DeanONeil 1 716 Oct-13-2017, 05:42 AM
Last Post: Larz60+
  [Tkinter] tkiinter combobox selection problem Rishav 2 1,286 Jul-28-2017, 07:48 AM
Last Post: Barrowman
  Where locate code to load combobox birdieman 1 1,002 Feb-20-2017, 10:06 PM
Last Post: nilamo

Forum Jump:


Users browsing this thread: 1 Guest(s)