Giter Site home page Giter Site logo

Comments (9)

ragardner avatar ragardner commented on June 16, 2024

I could add a zoom in / zoom out on ctrl mousewheel which would effectively do as you say, change the font and cell sizes

would this work for you?

if you need something more automated it would have to be some sort of auto scale based on resolution

from tksheet.

fdsilva-centi avatar fdsilva-centi commented on June 16, 2024

That would be great, thank you!

As for the second suggestion you made, an auto-scale would be perfect, but not really necessary. My first thought was like an initialization option, where you can define the scale of the table.

from tksheet.

ragardner avatar ragardner commented on June 16, 2024

It's taking a bit longer than expected to implement due to being a bit busy irl and having to code for correcting the positions of open windows such as a dropdown box upon zoom but I am working on it and hopefully nearly finished

from tksheet.

ragardner avatar ragardner commented on June 16, 2024

@fdsilva-centi Hello, I haven't added an initialization option yet but I have added zoom bindings on control (command on mac os) mousewheel or control + plus / control + minus

It does something very simple at the moment, just increases the font size which makes all the other stuff like dropdown arrows and checkboxes also increase in size

There's unfortunately no pop up to show scale or font size at the moment

It's in version 6.2.4

Let me know what you think of it

from tksheet.

fdsilva-centi avatar fdsilva-centi commented on June 16, 2024

Hey. Overall it's what I was looking for, thank you so much.

Are you planning on doing the pop up to show scale or font size as you mentioned? And the initialization option?
Either way, great job, thanks again!

from tksheet.

ragardner avatar ragardner commented on June 16, 2024

I've added an initialization option named zoom which is an int font size multiplier, 100 is no multiplier aka 100% no zoom, 90 would be zoomed out 10%, 110 would be zoomed in 10%

At the moment I don't have plans to add the pop up to show the scale due to time constraints

from tksheet.

Brazzelhuber avatar Brazzelhuber commented on June 16, 2024

Hi,

I have a similar (double) problem: I develop on a pc with screen resolution 3840x2160. Although I define table width = frame width and table height = frame height, the table is much to small (see appendix1)
Screenshot (186)
when I transfer the app to a pc with 1920x1080 resolution, the table is much to big
Screenshot2
here is the code:
` # Erstellen Sie das kleinere Fenster links unten
self.bottom_frame_links = ctk.CTkFrame(master=self,width=self.bottom_frame_links_width, height=self.bottom_frame_links_height, corner_radius=0)
self.bottom_frame_links.grid(row=1, column=1, padx=10, pady=10,sticky="nw")
self.bottom_frame_links.grid_propagate(False) # Fixiert die Groesse des Frames
self.anz_tab_cols = 7
self.table_width = int(self.bottom_frame_links_width)
self.table_col_width = int(self.table_width/self.anz_tab_cols )

self.table_height = int(self.bottom_frame_links_height)
self.anz_tab_rows = 5
self.table_row_height = int(self.table_height/self.anz_tab_rows )

self.table = Sheet(self.bottom_frame_links,
theme="dark",
header_height = "2",
show_y_scrollbar = False,
show_x_scrollbar = False,
show_row_index = False,
width=self.table_width, # identisch mit frame-Breite (self.bottom_frame_links_width)
height = self.table_height,
column_width = self.table_col_width,
row_height = self.table_row_height

                )

self.table.grid(row=0, column=0, sticky="nw")`
it does't get better, if I change sticky to "nsew"

Thanks in advance

from tksheet.

ragardner avatar ragardner commented on June 16, 2024

@Brazzelhuber Hello,

Your issue is a separate one from text zoom but I will try to advise here briefly anyway

it does't get better, if I change sticky to "nsew"

This is because you have set a Sheet() width and height already so expansion of the Sheets dimensions is ignored

In theory your code should work but in practice perhaps it might not for example when the application window has its dimensions change

So I suggest trying out the removal of the following lines:

width=self.table_width, # identisch mit frame-Breite (self.bottom_frame_links_width)
height = self.table_height,

and then making following change:

change this:

self.table.grid(row=0, column=0, sticky="nw")

to this:

self.table.grid(row=0, column=0, sticky="nwse")

If that doesn't work let me know in a new issue, perhaps with a bit more of a minimal example so I can understand what's going on a bit better

Cheers

from tksheet.

Brazzelhuber avatar Brazzelhuber commented on June 16, 2024

Hi ragardner,

thank you for your fast response. In the meanwhile, I found out, that sticky="nwse" is indeed better and additionally i saw, that the problem was partially caused by the fact that the big screen had a scaling of 150%, the small one one of 100%. The screen shots were only test programs. In this environment it works, when I set the small screen to 150% scaling (altough the widgets are getting very big). I will reconfigure my main app (currently the frames are overlapping at 150%). I will be back with the results soon.

best regards

Brazzelhuber

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.