Tk Library Source Code

Artifact [7455d1f1fd]
Login

Artifact 7455d1f1fddc2b4895e13ec6245391a961e043a1:

Attachment "mclistbox_1.02.diff" to ticket [1115335fff] added by koloska 2005-02-03 18:37:35.
--- mclistbox_orig.tcl	2005-02-01 13:08:26.000000000 +0100
+++ mclistbox.tcl	2005-02-01 13:38:40.000000000 +0100
@@ -143,13 +143,18 @@
     # and likewise for column-specific stuff. 
     array set columnOptions [list \
 	    -background         {background           Background} \
+	    -bd                 -borderwidth \
+	    -bg                 -background \
 	    -bitmap		{bitmap               Bitmap} \
+	    -fg                 -foreground \
 	    -font               {font                 Font} \
 	    -foreground         {foreground           Foreground} \
 	    -image              {image                Image} \
 	    -label 		{label                Label} \
 	    -position           {position             Position} \
 	    -resizable          {resizable            Resizable} \
+	    -selectbackground   {selectBackground     Foreground} \
+	    -selectforeground   {selectForeground     Background} \
 	    -visible            {visible              Visible} \
 	    -width              {width                Width} \
 	    -editable           {editable             Editable} \
@@ -1060,7 +1065,9 @@
 	    }
 	    -font -
 	    -foreground -
-	    -background {
+	    -selectforeground -
+	    -background -
+	    -selectbackground {
 		if {[string length $value] == 0} {set value $options($option)}
 		$listbox configure $option $value
 	    }
@@ -2098,7 +2105,12 @@
 
 	{column option} {
 	    if {[info exists columnOptions($opt)]} {
-		return $opt
+		# consider synonyms
+		if {[llength $columnOptions($opt)] == 1} {
+		    return $columnOptions($opt)
+		} else {
+		    return $opt
+		}
 	    }
 	    set list [array names columnOptions]
 	    set matches [array names columnOptions ${opt}*]