Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll using mousewheel and more widgets #89

Open
aplicacionamedida opened this issue Jan 28, 2017 · 3 comments
Open

Scroll using mousewheel and more widgets #89

aplicacionamedida opened this issue Jan 28, 2017 · 3 comments

Comments

@aplicacionamedida
Copy link

aplicacionamedida commented Jan 28, 2017

First of all, many thanks for this amazing software.

It's not possible to scroll the scrollbar using the mouse wheel for the notebook with "General", "Layout" and "Bindings" tabs. For example, the scrollbar appears when I select the toplevel widget, but I can't scroll using the mouse wheel. I am using Linux Mint.

I know that you added mouse wheel support for the right pane. Anyway I provide here two versions for this trick:
https://code.activestate.com/recipes/580640-scrolling-frame-with-mouse-support-new-version/
https://code.activestate.com/recipes/578894-mousewheel-binding-to-scrolling-area-tkinter-multi/

Another interesting enhancement is to add also auto scrollbar feature to scrolled frame mega widget. The before mentioned notebook use this trick. My XML Viwer megawidget use this trick also.

https://code.activestate.com/recipes/580752-xml-viewer-for-tkinter-or-xml-treeview

I also miss a better customization. The preference window require more work. I like normally bigger fonts and also it would be nice to have the possibility to choose bigger icons. Another possibility is to icons with names like the toolbar of GUI builder PAGE:

https://sourceforge.net/projects/page/

Another enhancement is to add the possibility to connect the UI with a Python module when using the designer. This Python module should provide a function named for example: "pygubu_connector". This function should return an object or dictionary for the connection of the UI with callbacks and Tkinter variables. This process is identical to using pygubu module inside a Tkinter application. The difference is that a path to this module with the definition of this special function is a set for the project (the name of this function should be a convention). This is a very interesting enhancement to see the application in action while designing at the same time with pygubu.

It's necessary to provide a framework for the contribution of third party widgets.

I have some interesting widgets. Maybe some of them could be interesting for pygubu:

XML Viewer
https://code.activestate.com/recipes/580752-xml-viewer-for-tkinter-or-xml-treeview

Date Picker
https://code.activestate.com/recipes/580725-tkinter-datepicker-like-the-jquery-ui-datepicker

Pagination
https://code.activestate.com/recipes/580720-pagination-widget-in-tkinter

Tag Entry
https://code.activestate.com/recipes/580734-tag-entry-for-tkinter-like-jquery-tag-it

Sticky Note
http://code.activestate.com/recipes/578885-draggable-desktop-note-or-sticky-notes-in-tkinter

Animated GIF
https://code.activestate.com/recipes/580708-tkinter-animated-gif

Another suggestion is to organize the menu widgets in another separated category named "Menu" instead of including these controls inside of "Pygubu Helpers" category.

I also miss the tooltip widget.

The software also lacks a menu editor like the menu editor of PAGE GUI builder:

https://sourceforge.net/projects/page

The menu editor in PAGE appears when I create a Toplevel and then I select in the menu bar: Widget > Edit Menu Bar..

The source code of Page menu editor is here:
page/lib/menus.tcl

This file is not a difficult code. Anyway it's possible to create easily something similar in Python without reading the Tcl code.

@alejandroautalan
Copy link
Owner

First of all, many thanks for this amazing software.

Hi Miguel, thanks for trying pygubu. :)

It's not possible to scroll the scrollbar using the mouse wheel for the notebook with "General", "Layout" and "Bindings" tabs. For example, the scrollbar appears when I select the toplevel widget, but I can't scroll using the mouse wheel. Although It works for the right pane. I am using Linux Mint.

I know that you added mouse wheel support for the right pane. Anyway I provide here two versions for this trick:
https://code.activestate.com/recipes/580640-scrolling-frame-with-mouse-support-new-version/
https://code.activestate.com/recipes/578894-mousewheel-binding-to-scrolling-area-tkinter-multi/

Another interesting enhancement is to add also auto scrollbar feature to scrolled frame mega widget. The before mentioned notebook use this trick. My XML Viwer megawidget use this trick also.

https://code.activestate.com/recipes/580752-xml-viewer-for-tkinter-or-xml-treeview

I will use your examples to try to implement mouse wheel support to ScrolbarHelper and ScrolledFrame.

I also miss a better customization. The preference window require more work. I like normally bigger fonts and also it would be nice to have the possibility to choose bigger icons.

I had not thought of that before. I could add options to change the menu font and default text.

Another enhancement is to add the possibility to connect the UI with a Python module when using the designer. This Python module should provide a function named for example: "pygubu_connector". This function should return an object or dictionary for the connection of the UI with callbacks and Tkinter variables. This process is identical to using pygubu module inside a Tkinter application. The difference is that I add the path to this module with the definition of this special function (the name of this function should be a convention). This is a very interesting enhancement to see the application in action while designing at the same time with pygubu.

This is becoming a common request (#29). I promise that I will analyze how to implement it.

I also want to propose to add more widgets. These are some of my recipes. Maybe some of them are interesting for pygubu:

XML Viwer
https://code.activestate.com/recipes/580752-xml-viewer-for-tkinter-or-xml-treeview

Date Picker
https://code.activestate.com/recipes/580725-tkinter-datepicker-like-the-jquery-ui-datepicker

I am already developing a Calendar Frame as the basis for a Datepicker (branch develop)
I'll use your Datepicker as an example to complete it.

Pagination
https://code.activestate.com/recipes/580720-pagination-widget-in-tkinter

Tag Entry
https://code.activestate.com/recipes/580734-tag-entry-for-tkinter-like-jquery-tag-it

Sticky Note
http://code.activestate.com/recipes/578885-draggable-desktop-note-or-sticky-notes-in-tkinter

Animated GIF
https://code.activestate.com/recipes/580708-tkinter-animated-gif

Your recipes are very interesting, I will certainly implement some of them.

Another suggestion is to organize the menu widgets in another separated category named "Menu" instead of including these controls inside of "Pygubu Helpers" category.

I will create another category "Menu" as you suggested.

I also miss the tooltip widget.

There is a simple ToolTip class in the pygubu internals. I'll find a way to integrate it with the designer.

Thank you for your comments!!

Regards,
Alejandro A.

@aplicacionamedida
Copy link
Author

aplicacionamedida commented Jan 29, 2017

Hi Alejandro again. Thanks for your quick answer. I think that its also interesting a menu editor similar to the menu editor of PAGE Tkinter builder:
https://sourceforge.net/projects/page/

Menus uses always the same pattern. I think that a menu editor could improve usability and productivity using the builder. The menu hierarchy is a more rigid structure.

This is an image of the menu editor:
http://page.sourceforge.net/html/_images/menu.jpg

Another customization is to add the possibility to choose between your view of the widget palette (an accordion of flexible containers with icons) or an accordion of listbox of icons and names together, because it cost a little to recognize the widget using only the icon. It's easier for the user to use icon and name together, because the widget icons are not standard icons (Icons that everybody understands without any explanation like "save file", "open file", "cut", "paste", ,"copy" and "find" icons). My proposal is identical to the toolbar of PAGE Tkinter builder. The listbox should be a treeview because the Tkinter listbox doesn't accept icons for the items.

Here you have some images of the proposed widget palette:
http://docs.activestate.com/komodo/3.5/img/overview.gif
https://i.stack.imgur.com/Qdbsi.png

This view option could be an option for the preferences dialog. I think that its nice to leave to the use to choose between different views. Many GUI's guives the possibility to customize the view. This is an important configuration option because the widget icons are not standard icons that everybody understands and also for me the icons are a little bit small, and this makes the widget palette more difficult to use (at least for me).

I also have a draggable list or sortable megawidget:
https://code.activestate.com/recipes/580748-tkinter-draggable-list-v2/

Another interesting option is to provide a "Run command" with a hotkey (for example: F5), to execute a python program using the created UI.

I also miss a hotkey for the command menu "Preview in Toplevel".

Many thanks in advance. If I have time, I would like to contribute in the future.

@matecsaj
Copy link

Should this split it separate issues and be moved here?

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

No branches or pull requests

3 participants