|
From: Dorothy R. <mo...@ar...> - 2003-05-14 05:37:07
|
Hmm. On all the wm's I have at hand, indices 3 and 4 are the same. Howe=
ver, I=20
see I was grabbing the color from the wrong place anyway, and I should ha=
ve got=20
it from the test menu:
*** 138,143 ****
--- 138,144 ----
. configure -menu .native
menu .native
set menufont [lindex [.native configure -font] 3]
+ set w(selcolor) [lindex [.native configure -selectcolor] 3]
destroy .native
# Find out what the tk default is
***************
*** 150,161 ****
destroy .testtext
entry .testent
- set w(selcolor) [lindex [.testent configure -selectbackground] 3]
set entryfont [lindex [.testent configure -font] 3]
destroy .testent
- # the above results in a nearly undistinguishable darker gray for the
- # selected color (rh8 with tk 8.3.3-74) "#c3c3c3"
- set w(selcolor) "#b03060"
# Make sure they're specified in points not pixels. AquaTk doesn't.
if {! [regexp -- {-} $labelfont]} {
--- 151,158 ----
Dorothy
Daniel H=F6pfl wrote:
> Hi!
>=20
> In line 153-158 you have:
>=20
> ------------------------------------------------------
> set w(selcolor) [lindex [.testent configure -selectbackground] 3]
> set entryfont [lindex [.testent configure -font] 3]
> destroy .testent
> # the above results in a nearly undistinguishable darker gray for the
> # selected color (rh8 with tk 8.3.3-74) "#c3c3c3"
> set w(selcolor) "#b03060"
> ------------------------------------------------------
>=20
> I think the problem is the index 3 when setting w(selcolor):
>=20
> ------------------------------------------------------
> set w(selcolor) [lindex [.testent configure -selectbackground] 4]
> set entryfont [lindex [.testent configure -font] 3]
> destroy .testent
> ------------------------------------------------------
>=20
> ... sets the value of "*selectBackground" from your .Xdefaults (or=20
> #bfdfff, a light blue, as default) into w(selcolor).
>=20
> An other solution would be:
>=20
> ------------------------------------------------------
> set w(selcolor) [lindex [.testent configure -selectforeground] 4]
> set entryfont [lindex [.testent configure -font] 3]
> destroy .testent
> ------------------------------------------------------
>=20
> In this case you get the value of "*selectForeground". Better than usin=
g=20
> the background color for the foreground of a checkbox.
>=20
> Is there a way to get the value of "*selector" from the .Xdefaults? I=20
> think this would be the "correct" value for this case.
>=20
> Greetings,
> Daniel
>=20
--=20
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Dorothy Robinson
http://www.twobarleycorns.net
|