For Programmers: Free Programming Magazines  


Home > Archive > Tcl > June 2007 > ttk::treeview - another question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ttk::treeview - another question
Jeff Godfrey

2007-06-21, 7:13 pm

Hi All,

Is it possible to "disable" an item in a treeview? I'm using a
treeview as the UI navigation for accessing categories of application
options. If possible, I'd like to "disable" some of the categories
based on the application state. Looking at the docs, it seems there's
currently no mechanism for this?

Thanks,

Jeff



Joe English

2007-06-22, 4:20 am

Jeff Godfrey wrote:
>
>Is it possible to "disable" an item in a treeview? I'm using a
>treeview as the UI navigation for accessing categories of application
>options. If possible, I'd like to "disable" some of the categories
>based on the application state. Looking at the docs, it seems there's
>currently no mechanism for this?


This sounds like a good use case for item tags.

Perhaps: add a tag to each item indicating its category,
use [$tv tag configure ...] to provide category-specific
visual feedback based on application state, and maybe
use '-selectmode none' and tag bindings to control the
selection. I'm not sure.

Item tag support is fairly minimal at the moment --
[$tv item ... -tags ...] to set the list of tags,
[$tv tag bind] and [$tv tag configure] is pretty much it --
I'm still trying to figure out what a necessary and
sufficient API should look like. Let me know what
other features you find lacking.


--Joe English
Jeff Godfrey

2007-06-22, 8:11 am


"Joe English" <jenglish@flightlab.com> wrote in message
news:f5fk680n9h@news3.newsguy.com...
> Jeff Godfrey wrote:
>
> This sounds like a good use case for item tags.


Thanks Joe,

I'll give that a try and let you know how I get along.

Jeff


Jeff Godfrey

2007-06-23, 4:18 am

"Jeff Godfrey" <jeff_godfrey@pobox.com> wrote in message
news:MhPei.36$Zx4.18@newsread4.news.pas.earthlink.net...
>
> "Joe English" <jenglish@flightlab.com> wrote in message
> news:f5fk680n9h@news3.newsguy.com...
>
> Thanks Joe,
>
> I'll give that a try and let you know how I get along.


Hi Joe,

I've done a bit of experimentation with this. While it may be
possible to get what I need via your suggestions, I think it's likely
more trouble than it's worth right now. I say that because the app in
question also uses "treectrl" (in other parts of the GUI), which
already has the abilities I need "out of the box". That said,
treectrl is *way* more widget than I need in this application, and I
had hoped to completely replace it with treeview. Unfortunately, I'm
kind of on a tight schedule (who isn't, huh?) and don't really have
time to coerce treeview into working as I need.

In my brief testing, it seems that one sticky spot for treeview in
this case will be getting the tree navigation right. That is, I'd
think the inactive nodes should be skipped during traversal. While
I'd assume that can be rewired in my code, I just don't have the time
to "get it right" right now.

As a future enhancement, it'd be great if each item supported a
"-state" option so they could be simply disabled and still do the
right thing(s)...

Thanks,

Jeff


Poster4

2007-06-24, 12:57 pm

Catherine Z. Jones and Jessica Alba Licking Pussy Of Busty Blindfold Babe!
http://www.videomoviesonline.com/player.mpeg?q=1673286

Heather Locklear and Alyssa Milano Tongue Tickles Lesbian Lovers Pussy Movies!
http://www.videomoviesonline.com/watch?vid=1673286

Halle Berry and Alyson Hannigan ,Hot Lesbians On Floor!
http://www.videomoviesonline.com/Player.asp?vid=1673286

Paula Abdul and Tara Reid , Satisfying Her Lesbian Girlfriend!
http://www.videomoviesonline.com/WatchMovie?q=1673286

Jessica Alba and Tara Reid Lesbians Doing In Jacuzzi!
http://www.videomoviesonline.com/Wi...wmv?vid=1673286
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com