#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    31
    Rep Power
    11

    Question How to make combo box uneditable in Python?


    Hello

    I just want to know that how the combo box in Python can be made uneditable?

    In MFC this cna be achieved by using Combo List which does not allows any change in the value of the combo box?


    TIA
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    What are you creating this object in? wxPython, Tkinter?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    31
    Rep Power
    11
    TKInter
  6. #4
  7. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    If the Combo widget is a composite of an Entry Widget and Listbox widget then the Entry widget can be disabled with its state method:

    from Tkinter import *

    ......
    myComboWidget.state(NORMAL)

    or

    myComboWidget.state(DISABLED)

    grim
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    If you are using the tixComboBox that is part of the TIX extensions to TkInter, then it has an 'editable' option.

    Dave - The Developers' Coach

IMN logo majestic logo threadwatch logo seochat tools logo