
You with the details here (see the Complete Pictorial I decided to build this table by accident in early 2002, as a result of a misunderstanding while reading Stored in a wooden periodic table, by which I mean a physical table you can actually sit at, in my All these samples (well, at least the ones that fit) are You ever wanted to know about that element. Click any element tile above and you will find probably more than This website documents, in great depth, a large collection of chemical elements and examples of theirĪpplications, common and uncommon. Job both scientifically and artistically." Posters up to four and half feet wide, laminiated place mats, 3D prints, and now a huge card deck! Most amazingly great URL, .īuy a copy of my new book THE ELEMENTS or a photo periodic table poster or card deck! Visit my other Periodic Table Website at the best possible Good luck with your program! Hope it all works out well for you.Newest Samples! Updated 13 January, 2010. Most devs want to help and want to know of problems or common questions that perhaps mean the documentation isn't clear. For pretty much all GitHub projects that are active, filing an Issue with that project tends to provide high-quality answers. The recommendation is that these be avoided for numerous reasons, including a basic lack of knowledge. The PySimpleGUI documentation has a section on support that begins by explaining that sites such as SO are not recommended. Or you can use data_selected to get only the first row selected. With the select mode of BROWSE set, you can assume your data_selected list will only have 1 entry, and thus data_selected will be that entry. If you wish to limit your user to selecting only 1 row at a time, then you can set the select_mode parameter when creating your table.īrowse will allow single rows rather than the default of multiple rows. Since events have been enabled in this example for the table, you can check for the event in your event loop and appropriately handle the event: if event = '_filestable_':ĭata_selected = for row in values]ĭata_selected will be a LIST of the rows of your original data. Trying to do so will generate an error that list indexes must be integers or slices. The values cannot be used to directly lookup values in your source table. The entry in the values dictionary for Tables is a LIST of the rows selected.īe cautious if you see a construct such as this: data_values] Let's dig another step deeper though to understand how the values entry for Tables works. This will help you not just in this situation, but others as well when using the PySimpleGUI package.
#Element table how to#
I like to provide answers that teach how to solve the problems rather than just blurting out an answer. [sg.Table(values=data_values, headings=data_headings, In your example, you need to do is add this parameter to your Table in the layout. If an element is capable of producing an event and doesn't do so by default (like a button or a menu), then you'll find a parameter enable_events.įor the Table element, you'll find the docstring (and thus the call reference also) has a parameter for the table element:Įnable_events – Turns on the element specific events. I am not aware of any event triggered by the table element You can access this same information via the docstrings (Control+Q when using P圜harm). The other is the call-reference documentation. These are meant to give you a jump-start on using features. When working with elements you've not used before in PySimpleGUI, it's helpful to look through several of the materials provided by the project.


Is it possible ? Thanks for any help.ĭata_headings = Table ready, row selected, button clicked, and now, how to get the entire row values ? I tried "values" but the result were somehow like table index.
#Element table code#
As I am not aware of any event triggered by the table element, I placed a button to be clicked once a row has been selected and then execute the code associated to click event. Once the table is ready with data, I can highlight a specific row. So far, I managed to populate the table element with data from a sqlite database.

The issue I am having is about the table element. I am a beginner on Python and even more beginner on PySimpleGui, which I enjoy so much playing around in creating small apps with a GU interface.
