_popup.css('padding', settings.popupPadding + 'px') _popup.css('color', settings.popupTextColor) _popup.css('background', settings.popupBackgroundColor) Var _nav_previous = _popup.find(settings.popupNavPreviousSelector) Var _nav_next = _popup.find(settings.popupNavNextSelector) Var _closer = _popup.find(settings.popupCloserSelector) Var _caption = _popup.find(settings.popupCaptionSelector) Var _loader = _popup.find(settings.popupLoaderSelector) Var _popup = jQuery('' + (settings.popupLoaderSelector ? '' + settings.popupLoaderText + '' : '') + '' + (settings.popupCaptionSelector ? '' : '') + (settings.popupCloserSelector ? '' + settings.popupCloserText + '' : '') + (settings.popupNavPreviousSelector ? '' : '') + (settings.popupNavNextSelector ? '' : '') + '') Var _popup = jQuery(settings.popupSelector) Settings.popupNavPreviousSelector = null WindowHeight = jQuery(window).height() + settings.windowHeightPad Var windowWidth, windowHeight, queue =, navPos = 0 OnPopupOpen: null // On Popup Open Callback OnPopupClose: null, // On Popup Close Callback PopupNavNextSelector: '.nav-next', // (Advanced) Popup Nav Next selector PopupNavPreviousSelector: '.nav-previous', // (Advanced) Popup Nav Previous selector PopupCaptionSelector: '.caption', // (Advanced) Popup Caption selector PopupCloserSelector: '.closer', // (Advanced) Popup Closer selector PopupLoaderSelector: '.loader', // (Advanced) Popup Loader selector PopupSelector: null, // (Advanced) Popup selector (use this if you want to replace the built-in popup) PopupClass: 'poptrox-popup', // Popup class PopupCloserText: '×', // Popup closer text PopupBlankCaptionText: '(untitled)', // Applied to images that don't have captions (when captions are enabled) PopupCaptionTextSize: null, // (Default Style) Popup caption text size PopupCaptionHeight: 60, // (Default Style) Popup height of caption area PopupPadding: 10, // (Default Style) Popup padding (when usePopupStyling = true) PopupCloserTextSize: '20px', // (Default Style) Popup closer text size PopupCloserTextColor: '#FFFFFF', // (Default Style) Popup closer text color (when usePopupStyling = true) PopupCloserBackgroundColor: '#000000', // (Default Style) Popup closer background color (when usePopupStyling = true) PopupLoaderTextSize: '2em', // (Default Style) Popup loader text size PopupTextColor: '#000000', // (Default Style) Popup text color (when usePopupStyling = true) PopupBackgroundColor: '#FFFFFF', // (Default Style) Popup background color (when usePopupStyling = true) UsePopupDefaultStyling: true, // If true, default popup styling will be applied (background color, text color, etc) UsePopupNav: false, // If true, show (and use) popup navigation UsePopupCaption: false, // If true, show the popup image caption UsePopupCloser: true, // If true, show the popup closer button/link UsePopupLoader: true, // If true, show the popup loader UsePopupEas圜lose: true, // If true, popup can be closed by clicking on it anywhere UseBodyOverflow: true, // If true, the BODY tag is set to overflow: hidden when the popup is visible PopupIsFixed: false, // If true, popup won't resize to fit images WindowMargin: 50, // Window margin size (in pixels only comes into play when an image is larger than the viewport) Preload: false, // If true, preload fullsize images in the background #menuToggle input:checked~span:nth-last-child(3) Transform: rotate(45deg) translate(-2px, -1px) So, until the user clicks out of the focus of that menu, the program won't be coming out to execute the next lines of the function (in which you are calling the tk_popup for the submenu.) The reason is that using tk_popup or post will make the menu appear on the screen for sure, but then the program's focus gets shifted to the user's mouse and keyboard. Even if you add some gap to the x-y values using some integers, still you won't be seeing the second menu. (my_menu, my_menu2), but my attempt just displays both but with theįirst menu overlapping, so the other doesn't show. When I middle-click, I tried to make it so it displays both the menus You will have to create a customized menu bar without using the widget tk.Menu. "That's just not how Tkinter menus are designed to work." The first menu AND then automatically runs the cascade, as if it wasĬonsidering this answer by Bryan Oakley and the documentation available on the internet, there is no way for making a menu and a submenu visible simultaneously. So the question is, how do I make it so when middle-clicking, it opens
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |