ttkwidgets icon indicating copy to clipboard operation
ttkwidgets copied to clipboard

About timeline.

Open water5 opened this issue 2 years ago • 1 comments

The help document seems incorrect, type of resolution, tick_resolution should be float, https://github.com/TkinterEP/ttkwidgets/blob/master/ttkwidgets/timeline.py#L100

   :param resolution: Amount of time per pixel [s/pixel]
   :type resolution: int
   :param tick_resolution: Amount of time between ticks on the timeline
   :type tick_resolution: int

resolutionseems must >= 0.01, otherwise the program will not response. When options start, finish fixed, can I configure resolution >= 0.01? (e.g. 1.0, let the marker move and return args interval is 1.0.)

water5 avatar Mar 04 '22 18:03 water5

You are correct, the types in the documentation are not correct.

When you choose a very low resolution, the timeline might become very big. At least on Linux if I for example choose start=0, finish=10 and resolution=0.001, I get a BadAlloc error, indicating that not enough resources are available to create the widget. I don't know how the program will behave on Windows when this happens.

However, the exact limit might depend on a number of factors, which would have to be derived from the actual Tk code. In the past I have run into issues when using more than 16MiB of video memory, for example, but it depends also on configuration, OS, etc.

RedFantom avatar Mar 16 '22 10:03 RedFantom