
Security News
Node.js Homepage Adds Paid Support Link, Prompting Contributor Pushback
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Modern menu bar widget library for customtkinter.
pip install CTkMenuBar
from CTkMenuBar import *
...
menu = CTkMenuBar(master=root)
menu.add_cascade("Menu")
...
Parameter | Description |
---|---|
master | define the master widget, can be root or frame |
bg_color | set the bg color of the menu bar |
height | set height of the menu bar |
width | set width of the menu bar buttons |
padx | set internal padding between menu bar buttons |
pady | set internal padding in top and bottom of menu bar |
postcommand | add a command before spawing the dropdown |
*other frame parameters | other ctk frame parameters can also be passed |
This title menu is only supported in windows OS!
from CTkMenuBar import *
...
menu = CTkTitleMenu(master=root)
menu.add_cascade("Menu")
...
Parameter | Description |
---|---|
master | define the master window, can be root or toplevel only |
bg_color | set the bg color of the menu bar |
title_bar_color | set color to the header (only works with windows 11), RGB order: 0x00rrggbb |
width | set width of the menu bar buttons |
padx | set internal padding between menu bar buttons |
x_offset | set the x distance from the header |
y_offset | set the y distance from the header |
postcommand | add a command before spawing the dropdown |
*other frame parameters | other ctk frame parameters can also be passed |
This is the common dropdown menu class which is used by both ctkmenubar and ctktitlemenu.
from CTkMenuBar import *
...
dropdown = CustomDropdownMenu(widget=button)
dropdown.add_option(option="value")
dropdown.add_separator()
submenu = dropdown.add_submenu("submenu")
submenu.add_option(option="value")
...
Parameter | Description |
---|---|
widget | attach the dropdown to the cascade widget |
master | optional, change the spawn window if required |
bg_color | set the bg color of the dropdown |
fg_color | set the option button fg color |
text_color | set the text color |
hover_color | set hover color of the option button |
separator_color | change the separator line color |
font | change the font of the text |
width | set width of the dropdown |
height | set height of the dropdown |
padx | set padding in x for the dropdown frame |
pady | set padding in y for the dropdown frame |
*other frame parameters | other ctk frame parameters can also be passed |
Credits goes to LucianoSaldivia for providing this dropdown menu class.
FAQs
Customtkinter Menu Widget
We found that CTkMenuBar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.
Research
Security News
The Socket Research Team investigates a malicious Python typosquat of a popular password library that forces Windows shutdowns when input is incorrect.