GithubHelp home page GithubHelp logo

Issue with set_sheet_data about tksheet HOT 6 CLOSED

mithoon19 avatar mithoon19 commented on June 12, 2024
Issue with set_sheet_data

from tksheet.

Comments (6)

ragardner avatar ragardner commented on June 12, 2024

Hello and thank you very much for your report, I suspect this is a bug and I'll get back to you when I have fixed it

from tksheet.

ragardner avatar ragardner commented on June 12, 2024

@mithoon19 I am having some trouble reproducing the error myself, is there a way you could provide me a minimal example?

I am currently using the below code on tksheet version 6.2.5

# ruff: noqa

from tksheet import *
import tkinter as tk
import random


class demo(tk.Tk):
    def __init__(self):
        tk.Tk.__init__(self)
        self.grid_columnconfigure(0, weight=1)
        self.grid_rowconfigure(0, weight=1)
        self.frame = tk.Frame(self)
        self.frame.grid_columnconfigure(0, weight=1)
        self.frame.grid_rowconfigure(0, weight=1)

        self.sheet = Sheet(self.frame,
                            show_top_left=False,
                            show_row_index=False,
                            show_x_scrollbar=False,
                            show_y_scrollbar=False,
                            empty_horizontal=0,
                            empty_vertical=0,
                            headers=['1', '2', '3', '4', '5', '6', '7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22'],
                            theme="dark",
                            width=800,
                            height=200,
                            align="c")
        self.sheet.set_column_widths([200, 80, 80, 80, 120, 100, 100, 100, 70, 70, 70, 70, 60, 70, 70, 70, 70, 70, 70, 50, 50, 50])
        self.sheet.enable_bindings("all", "edit_index", "edit header", "ctrl_select")
        self.sheet.popup_menu_add_command(
            "test",
            self.test,
            table_menu=True,
            header_menu=True,
            empty_space_menu=True,
        )

        self.frame.grid(row=0, column=0, sticky="nswe")
        self.sheet.grid(row=0, column=0, sticky="nswe")


    def test(self, event=None):
        t = random.randint(0, 500)
        newdata = [[f"{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n" for c in range(22)] for r in range(30)]
        self.sheet.headers([f"{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n{t}\n" for c in range(22)])
        self.sheet.set_sheet_data(data=newdata, reset_col_positions=False)


app = demo()
app.mainloop()

from tksheet.

mithoon19 avatar mithoon19 commented on June 12, 2024

Thank you for quick response. I unable to reproduce the error. It just happens randomly. Most of the time it works just perfect. So, I am unable to figure out what could be the issue.

from tksheet.

ragardner avatar ragardner commented on June 12, 2024

Ok no worries in that case, just to check before I make some changes sorry, which version of tksheet are you using?

from tksheet.

mithoon19 avatar mithoon19 commented on June 12, 2024

I am using Version: 6.2.5

from tksheet.

ragardner avatar ragardner commented on June 12, 2024

@mithoon19 The issue should be totally fixed in version 6.2.6, release notes:

Version 6.2.6

Fixed:

  • #201
  • The ends of grid lines were incorrectly displaying connections with one another when only showing horizontal or vertical grid
  • When a cell dropdown and a row checkbox were in the same cell both would be drawn but only one would function, this has been changed to give dropdown boxes priority
  • Index text overlapping checkbox when alignment is "right"/"e"/"east" and index is not wide enough

Added:

But please let me know if you encounter any issues!

Thanks for your help

from tksheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.