Skip to content

Comments

Update ctk_scrollable_frame.py#2361

Open
Musa-Sina-Ertugrul wants to merge 1 commit intoTomSchimansky:masterfrom
Musa-Sina-Ertugrul:master
Open

Update ctk_scrollable_frame.py#2361
Musa-Sina-Ertugrul wants to merge 1 commit intoTomSchimansky:masterfrom
Musa-Sina-Ertugrul:master

Conversation

@Musa-Sina-Ertugrul
Copy link

with this update, there can be two scrollable; with these scrollables x and y will be scrollable simultaneously. Two scrollable were necessary for my project. Therefore I thought, someone could have the same problem so I opened this PR

Copy link

@sidhantsambyal sidhantsambyal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much need functionality lagging in here. Good to see it coming

@Musa-Sina-Ertugrul
Copy link
Author

39d9d12f7360ee2650b039818da184f0

@Anonymous6598
Copy link

Does it support .place() method now?

@PhilipNelson5
Copy link

It would be nice to add an example of this feature to test_scrollable_frame.py

@Anonymous6598
Copy link

Agree

@Musa-Sina-Ertugrul
Copy link
Author

Okey, that sounds logical. I will add but I have to study my exams right now

@FedericoSpada
Copy link
Collaborator

Hi,
I would modify the "orientation" parameter to accept a third option: "both".
Then, all the conditions you have added can be updated to

if self._orientation in ["horizontal", "both"]
OR
if self._orientation in ["vertical", "both"]

Finally, for the cget() method, there is no need to differentiate between "scrollbar_x_..." and "scrollbar_y_..." settings, since you didn't add separate parameters for them. You can restore the previous code and return the value for the first available scrollbar:

elif attribute_name.startswith("scrollbar_..."):
    if self._orientation == "horizontal":
        return self._scrollbar_x.cget("...")
    else:
        return self._scrollbar_y.cget("...")

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants