473,786 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: how to change menubar background color

Dear all,

I am trying to figure out how to change the background color of my
menubar under Windows.

I've tried the following:

from Tkinter import *

root = Tk()
menu = Menu(root,backg round="blue")
root.config(men u=menu)
menu.add_cascad e(label="File", command=None)
root.mainloop()

but its a no go.

Maybe I should post a direct tk command or change the default
"SystemButtonFa ce" color.

Or maybe its impossible - but I was told nothing is impossible so this
may be traumatic for me :(
TIA.
Jul 18 '05 #1
2 5970
Tk uses the native windows menu control to draw the menubar. This may
mean you're unable to change it. If background= doesn't work, well,
you're probably stuck.

You can use a non-native menubar by creating a menu frame and packing a
bunch of menubuttons into it, but this won't look as nice as a native
menu, and probably won't work with the predefined alt-key bindings
(alt+f = file, etc).

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA6BPNJd0 1MZaTXX0RAvjPAJ 9rdYFmusrjGZ2TI l2dlTYRLl+faQCf ZJ5E
0Bx08LS4ve1sRrq bnViblT8=
=ZiR1
-----END PGP SIGNATURE-----

Jul 18 '05 #2

Thanks for the reply Jeff.
I will try to create a non native menubar as you suggested.

Itay.

Jeff Epler <je****@unpytho nic.net> wrote in
news:ma******** *************** *************** @python.org:
Tk uses the native windows menu control to draw the menubar. This may
mean you're unable to change it. If background= doesn't work, well,
you're probably stuck.

You can use a non-native menubar by creating a menu frame and packing a
bunch of menubuttons into it, but this won't look as nice as a native
menu, and probably won't work with the predefined alt-key bindings
(alt+f = file, etc).

Jeff

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
65767
by: Code Monkee | last post by:
How can the toolbar and menubar be hidden in IE? When opening the window via javascript I can specify 'toolbar=no,menubar=no', which works fine. However if the window already exists how can I remove them? If the browser is Netscape I can use javascript: window.toolbar.visible = false; window.menubar.visible = false; but IE produces the error: "'window.toolbar.visible' is null or not an object".
4
44334
by: Nathan Given | last post by:
Hello All, I am trying to randomly change the background image of my home page but I can't seem to figure it out. Here is a snippet of my css .... BODY {background:transparent url(../images/homepagebg3.jpg) no-repeat; font:normal 90% Arial, Helvetica, sans-serif; color:#263158;}
1
1565
by: Richard Hollenbeck | last post by:
I'm building custom menubars for my application--a different one for each form. When I right-click on a menubar and select Customize and click on the toolbars tab, the menubar called "Menu Bar" can sometimes be unchecked and other times it can't. I'm wondering what determines when and why it sometimes prevents me from unchecking it. In my main form, the "Menu Bar" is unchecked but my custom menubar is checked. I also have my main form's...
8
2874
by: Jho | last post by:
Is it wise to do the following to hide html source and other info. I plan to do a popup window which would close my existing web page and popup a window in its place without toolbar and menubar. are there any disadvantages of hiding browser toolbar and menubar ?
2
1472
by: A.J. Pool | last post by:
I have a form with a main menubar containing a number of menu options. In the empty right half of the menubar I want to place a combobox where users can make some sort of selection. However, when I place a combobox on the form and move it to the menu area it disappaears behind the menubar, instead of appearing in front of it. How can I place the combobox on top of (or in front of) the menubar? I use VB.NET 2003 standard edition. --...
1
1440
by: Simon Wigzell | last post by:
I have a picture gallery webpage. Naturally I want as much space as possible for the pictures but with browsers these days the actual available area is only 2/3 - 3/4 of the total window. So I have the initial webpage open the actual gallery in another window as follows: quickgallery = window.open(filename,'quickgallery','toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=yes').focus(); Is it possible to...
5
3283
by: sierra7 | last post by:
Hi I have been writing Access applications for some years now and have moved away from from the 'Switchboard' type of opening form to using a menubar accross the top of the screen and borderless form used as a 'background', which shows a graphic, revision status & contact details etc The menu-bar works fine when clicked by a mouse, but beeps when using an Alt+ letter 'acceleration' key, unless another user-form is already open over the top...
10
3912
by: The Bicycling Guitarist | last post by:
Hello. I have a navigation bar at the top of all my pages with css-styled buttons that change color when hovered over. I am a little confused on how to disable that for the link that the page is on, for example, the sitemap link in the navigation bar on the sitemap page, the studies link for the navigation bar on the studies page, etc. The css is at http://www.TheBicyclingGuitarist.net/css/style.css The sitemap is at...
2
7475
by: mjrtom19 | last post by:
I have a Jframe using a menubar to determine the color and shape of a graphics2d object, at the moment the color stays red no matter what. I think the problem is in the itemListener in the inner class myShape, but I dont know what it is. Heres the code: import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.awt.Graphics2D.*; import java.awt.geom.*;
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.