From: Harald O. <Har...@El...> - 2009-04-15 06:47:13
|
Thank you Steve for your question. TCL user questions are on the TCL news group comp.lang.tcl: http://groups.google.com/group/comp.lang.tcl/topics To your question: TCL'er could not help very much I suppose. Propably, you should store the "handles" returned by the radiobutton calls in an array (or whatever) and apply methods later on like: $c fconfigure -state disabled c($Mode) = Radiobutton(frameAtt, text=text, indicatoron=0, ... $c(S) fconfigure -state disabled Hope this helps, Harald norseman schrieb: > I looked at the list headers and this seems to be the default. > If I'm in the wrong place - please re-direct me. > > > Python, using Tkinter to translate, seems to use Tk "as is". > I suspect TclTk people will have a much better idea of what can and > cannot be done with the Tk GUI. SO: > > QUESTION #1: > > I'm using Python 2.5.2 and Tkinter vers??? (which came with python) > The following pieces do in fact work. The mode/text in the AttTyp > list is read into the Radiobutton widget and (with the rest of the > code needed) works as expected. > > AttTyp = [ > ("S", "Single Use"), > ("I", "Intercropping"), > ("D", "Double Cropping"), > ("T", "Triple Cropping"), > ("M", "Mixed Land Use"), > ("","---------------"), > ("t", "Toggle Table Display"), > ] > # > . The above is almost a simple cut and paste > . from the program legend. And it is the > . shortest, by far, length of list of them. > . > # > for mode, text in AttTyp: > c = Radiobutton(frameAtt, text=text, indicatoron=0, > variable=AttVal, value=mode, command=getAttTyp) > c.pack() > # > > The question is, using this approach how do I control the individual > accessibility of each button? (gray out one or another or more under > program control) > "This approach" being the "for" loop as opposed to manually entering the > mode/text in line after line after line after.... > The computer is supposed to do the mundane, isn't it? > > > QUESTION #2: > Got the answer just before sending this. > > > > Steve > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Tcl-Core mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-core > -- ELMICRON Dr. Harald Oehlmann GmbH Koesener Str. 85 D - 06618 Naumburg Phone: +49 (0)3445 781120 Fax: +49 (0)3445 770142 www.Elmicron.de German legal references: Geschaeftsfuehrer: Dr. Harald Oehlmann UST Nr. / VAT ID No.: DE206105272 HRB 12803 / Amtsgericht Halle-Saalkreis |