ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tktable-users
tktable-users
[Tktable] Table title selection selects all rows with -selecttype=row and selectmode=extended
by EXT-Kielty, Shawn other posts by this author
Jun 18 2004 6:28PM messages near this date
RE: [Tktable] How to undo actions and Stop users from modifying width and height of restricted cell | RE: [Tktable] Table title selection selects all rows with -selecttype=row and selectmode=extended
Hi -- 

I am trying to use the column titles to sort the table and find that
with selectmode set to extended -- and selecttype to row - that the
selection in the title cells of the column causes the entire table to be
selected - which was a bit of a surprise to me. I would expect this if I
had rowtitles and coltitles and had selected the upper left most cell -
but otherwise I would anticipate not changing the selection if selectype
was row and a title column was selected.  

What interests me more -- would be to find a way to intercede or
configure the widget differently -- to stop that from happening -- so
that I might select the title for the column -- and use it to sort the
column -- without changing the selection in the table.   

Any help would be appreciated.  

Thanks 

Shawn 

Here's  some sample code: 

### Code start 
package require Tktable 
	
proc SelectTable {cell} {
	if [$::Table tag includes title $cell] {
		# break
	}
}

array set ::table1 {
	header {"Type" MIG PVCS "PROP" "Element Name" "Last Modified"
"Additional Properties"}
}   	
	
set sw2 [frame .a] 
	
set ::Table [table $sw2.table -cursor {} -variable table11
-browsecommand "SelectTable %C"]

pack $::Table -expand 1 -fill both 
	# pack $tree $sw $pw -expand 1 -fill both 
pack  $sw2   -expand 1 -fill both 

$::Table  configure 	  	-bg white   		-bd 0 		-bordercursor sb_h_double_arrow 		-titlerows 1
 		-roworigin -1 		-colorigin 0 		-resizeborders col 		-rows 1 -cols 7 		-relief sunken 		-w
idth 0 -height 0  		-autoclear 1 		-rowstretchmode none 		-colstretchmode all 		-selectmode 
extended 		-selecttype row 		-colwidth 10 -anchor w -fg black 
    

$::Table tag configure title -bd 1 -relief raised -state disabled 
$::Table set row -1,0 $::table1(header)
$::Table width 0 5 1 5 2 5 3 6 4 30 5 30 6 30
$::Table insert row 0 5 
$::Table  configure  -state disabled 
### Code start 



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Tktable-users mailing list
Tktable-users@[...].net
https://lists.sourceforge.net/lists/listinfo/tktable-users
Thread:
EXT-Kielty, Shawn
Jeff Hobbs

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved