Suggestions wanted

Discussion in 'Python' started by norseman, Apr 16, 2009.

  1. norseman

    norseman Guest

    Problem:
    Using Python 2.5.2 and Tkinter ??? (came with system)
    List made and for loop in use
    lst=[ ("S", "Single"), .....]

    for mode, text ....
    c = Radiobuton(.....
    c.pack()

    At this point the program runs, but I cannot control gray-out of a
    specific Radiobutton.

    If I:

    counter=0
    for mode, text ....
    c[counter] = Radiobuton(specified_frame,..
    c[counter].pack()
    counter += 1
    .
    .
    blockUseOf= $varSetElsewhere
    c[blockUseOf].config(state = strSetElsewhere)

    Program crashes on Radiobutton line.

    There are a number of Frames containing Radiobuttons in the program.
    The individual lists are long enough no one in their right mind wants to
    hand code such repetition and then try to maintain it. Not even with a
    code generator. (Number and organization will change over time.)
    How do I set things to be able to control any given Radiobutton from
    elsewhere in the program and still use the for-loop loader?


    Steve
     
    norseman, Apr 16, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GriffithsJ

    Book suggestions

    GriffithsJ, Aug 15, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    979
    Wayne Wengert
    Aug 16, 2003
  2. Harvey
    Replies:
    0
    Views:
    1,051
    Harvey
    Jul 16, 2004
  3. Harvey
    Replies:
    1
    Views:
    1,133
    Daniel
    Jul 16, 2004
  4. Kirk Strauser
    Replies:
    1
    Views:
    431
    Kirk Strauser
    Jun 11, 2004
  5. A.M. Kuchling
    Replies:
    0
    Views:
    357
    A.M. Kuchling
    Oct 27, 2005
  6. norseman
    Replies:
    1
    Views:
    248
    Steven D'Aprano
    Apr 18, 2009
  7. snacktime
    Replies:
    1
    Views:
    146
    Robert Klemme
    Sep 20, 2005
  8. RichardOnRails
    Replies:
    11
    Views:
    261
    RichardOnRails
    Sep 7, 2008
Loading...