From: Sue on 19 May 2010 08:00 I am trying to change the background color on an active menu item to orange with active foregrround of black text. I can change the submenus of a cascaded menu, but the toplevel menu item (in the example below "File". "Edit" "Help") remains blue with white text when active. Also the arrow that denotes the cascade remains white. I would have expected it to be black. Example code: set awin [toplevel .awin] menu .menubar -activebackground #ffc891; ..menubar configure -activeforeground #000000 -activebackground #ffc891; ..awin config -menu .menubar foreach m { File Edit Help } { set $m [menu .menubar.m$m] .menubar add cascade -label $m -menu .menubar.m$m .menubar.m$m configure -activeforeground #000000 - activebackground #ffc891; } ..menubar.mFile add cascade -label New -menu .menubar.mFile.new; ..menubar.mFile add cascade -label Open -menu .menubar.mFile.open; Thanks for any help in advance.
From: Arndt Roger Schneider on 19 May 2010 09:30 Sue schrieb: >I am trying to change the background color on an active menu item to >orange with active foregrround of black text. I can change the >submenus of a cascaded menu, but the toplevel menu item (in the >example below "File". "Edit" "Help") remains blue with white text when >active. Also the arrow that denotes the cascade remains white. I >would have expected it to be black. > >Example code: >set awin [toplevel .awin] >menu .menubar -activebackground #ffc891; >.menubar configure -activeforeground #000000 -activebackground >#ffc891; >.awin config -menu .menubar >foreach m { File Edit Help } { > set $m [menu .menubar.m$m] > .menubar add cascade -label $m -menu .menubar.m$m > .menubar.m$m configure -activeforeground #000000 - >activebackground #ffc891; >} >.menubar.mFile add cascade -label New -menu .menubar.mFile.new; >.menubar.mFile add cascade -label Open -menu .menubar.mFile.open; > > >Thanks for any help in advance. > > > What operationg system? windows (not possible under OSX or Windows). Btw use the option database for such things: option add *Menu.activeForeground black option add *Menu.activeBackground #fffc891 toplevel .awin -menu .awin.menubar menu .awin.menubar foreach ... -roger
From: Sue on 19 May 2010 10:01 On May 19, 9:30 am, Arndt Roger Schneider <arndt.ro...(a)web.de> wrote: > Sue schrieb: > > > > >I am trying to change the background color on an active menu item to > >orange with active foregrround of black text. I can change the > >submenus of a cascaded menu, but the toplevel menu item (in the > >example below "File". "Edit" "Help") remains blue with white text when > >active. Also the arrow that denotes the cascade remains white. I > >would have expected it to be black. > > >Example code: > >set awin [toplevel .awin] > >menu .menubar -activebackground #ffc891; > >.menubar configure -activeforeground #000000 -activebackground > >#ffc891; > >.awin config -menu .menubar > >foreach m { File Edit Help } { > > set $m [menu .menubar.m$m] > > .menubar add cascade -label $m -menu .menubar.m$m > > .menubar.m$m configure -activeforeground #000000 - > >activebackground #ffc891; > >} > >.menubar.mFile add cascade -label New -menu .menubar.mFile.new; > >.menubar.mFile add cascade -label Open -menu .menubar.mFile.open; > > >Thanks for any help in advance. > > What operationg system? windows (not possible under OSX or Windows). > Btw use the option database for such things: > > option add *Menu.activeForeground black > option add *Menu.activeBackground #fffc891 > > toplevel .awin -menu .awin.menubar > menu .awin.menubar > > foreach ... > > -roger Win32 and Win64.
|
Pages: 1 Prev: A little list/dict bug? Next: Translate TCL to C/C++ for SQLite example |