Skip to content

Hidden last record in table. #95

Description

@Hoklifter

For some reason, when i created my table, the last record (row and its columns) was hidden until i clicked on them.

    def render(self):
        self.recreate_dom_things()
        current:FC2XmlElement = self.stack[-1]


        for index, child in enumerate(current.element_instance):
            child = FC2XmlElement(child)

            if len(child) > 0:
                link_button = ActionButton(
                    master=self.dom_related_frame.button_frame,
                    text=f"{index}. {child.name}",
                    command=lambda c=child: self.create_table(c)
                )

            else:
                row = table_length = self.table_canva.model.getRowCount()

                self.table_canva.addRow(index)
                self.table_canva.model.setValueAt(child.name, row, 0)
                self.table_canva.model.setValueAt(child.text, row, 1)

Got fixed when i added:

self.table_canva.updateModel(self.table_canva.model)

after the self.table_canva.model.setValueAt(child.text, row, 1) (last) line

Operating system: Pop!_OS 22.04 LTS
Python version: 3.10.12
Installation method: pip install tkintertable

Sorry for any mistake, this is my first time opening an issue.

Before:
Screenshot from 2024-09-03 12-27-02
Screenshot from 2024-09-03 12-27-09
Screenshot from 2024-09-03 12-27-12
Screenshot from 2024-09-03 12-27-07
After:
Screenshot from 2024-09-03 12-27-24

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions