Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
menutest.py14 linesDownload Raw Back to Demos
1# Run this as a python script, to gray "close" off the edit window system menu.2import win32con3from pywin.framework import interact4 5if __name__ == "__main__":6    import demoutils7 8    if demoutils.NeedGoodGUI():9        win = interact.edit.currentView.GetParent()10        menu = win.GetSystemMenu()11        id = menu.GetMenuItemID(6)12        menu.EnableMenuItem(id, win32con.MF_BYCOMMAND | win32con.MF_GRAYED)13        print("The interactive window's 'Close' menu item is now disabled.")14