f



modifying Tk's menus on Windows

I've modified the Tk C code to remove the "double-vision" disabled menus, and changed the colors via tcl resources, but I can't find out how to change the menu bar colors, or reduce the border width on the popup.

here's a picture of what I have:

http://inivis.com/external/nastytkmenu.png

That's under Windows 7.  Under windows 10, the menubar is a single color and the borders loo different.

Obviously these things are outside the control of Tcl/Tk scripts, which is why I want to modify the source code. It must be possible since other programs have different menus bars, colors and menu borders.

How can I modify the appearance of these menus?  Would it be somewhere in the tk C code (I can't find anything) or via a Windows resource file or something else?
0
AndyH
12/18/2016 4:03:46 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

2 Replies
247 Views

Similar Articles

[PageSpeed] 37

Am Sonntag, 18. Dezember 2016 17:03:51 UTC+1 schrieb AndyH:
> I've modified the Tk C code to remove the "double-vision" disabled menus, and changed the colors via tcl resources, but I can't find out how to change the menu bar colors, or reduce the border width on the popup.
> 
> here's a picture of what I have:
> 
> http://inivis.com/external/nastytkmenu.png
> 
> That's under Windows 7.  Under windows 10, the menubar is a single color and the borders loo different.
> 
> Obviously these things are outside the control of Tcl/Tk scripts, which is why I want to modify the source code. It must be possible since other programs have different menus bars, colors and menu borders.
> 
> How can I modify the appearance of these menus?  Would it be somewhere in the tk C code (I can't find anything) or via a Windows resource file or something else?

Hi,

Since you want to completely change the default look of drop down menus, I would replace them widgets that can be controlled by Tk (e.g. by floating windows, frames and labels)

Btw.: It's nice to see a Tk GUI which is truly designed for appealing looking.


Alexandru
0
Alexandru
12/18/2016 5:57:12 PM
On Sunday, December 18, 2016 at 5:57:16 PM UTC, Alexandru wrote:
> Am Sonntag, 18. Dezember 2016 17:03:51 UTC+1 schrieb AndyH:
> > I've modified the Tk C code to remove the "double-vision" disabled menu=
s, and changed the colors via tcl resources, but I can't find out how to ch=
ange the menu bar colors, or reduce the border width on the popup.
> >=20
> > here's a picture of what I have:
> >=20
> > http://inivis.com/external/nastytkmenu.png
> >=20
> > That's under Windows 7.  Under windows 10, the menubar is a single colo=
r and the borders loo different.
> >=20
> > Obviously these things are outside the control of Tcl/Tk scripts, which=
 is why I want to modify the source code. It must be possible since other p=
rograms have different menus bars, colors and menu borders.
> >=20
> > How can I modify the appearance of these menus?  Would it be somewhere =
in the tk C code (I can't find anything) or via a Windows resource file or =
something else?
>=20
> Hi,
>=20
> Since you want to completely change the default look of drop down menus, =
I would replace them widgets that can be controlled by Tk (e.g. by floating=
 windows, frames and labels)
>=20
> Btw.: It's nice to see a Tk GUI which is truly designed for appealing loo=
king.
>=20
>=20
> Alexandru

Thanks Alexandru. At the moment, the tcl/tk code is portable and works on t=
he Mac and Linux. There's all sort of sensitivity code.  I think it would b=
e a big job reimplement it properly. I did once try to implement my own men=
u system but could never get the transition from one pulldown to the next w=
orking.  That was a while ago. =20

I think it would be easier (and more logical) to change the Tk C code. It w=
ould be great if I knew how to control the Windows menubar/border looks (I'=
m not experienced with Windows UI programming - which is why Tcl/Tk is exce=
llent).  At the very least, I'd be happy if I could remove or reduce the th=
ickness of the ugly borders on the menu popups.

If I could control the borders and change the menu bar color, it would 'com=
plete' the look of my UI, and if implemented in future Tk, make other Tcl/T=
K UI's look a lot more professional.
0
ac3dandy
12/18/2016 9:36:57 PM
Reply: