Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Disabling some items in CCombobox

Disabling some items in CCombobox

Scheduled Pinned Locked Moved C / C++ / MFC
json
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Veeresh Hiremath
    wrote on last edited by
    #1

    Hi all, I have a combo-box consisting of 30 elements. I want the elements from 1-12 enabled , and the rest(13-30) disabled and also once the user selects the disbaled items , the combo box should take care of not selecting the options How could I do this .. Regards, Veeresh

    R T M 3 Replies Last reply
    0
    • V Veeresh Hiremath

      Hi all, I have a combo-box consisting of 30 elements. I want the elements from 1-12 enabled , and the rest(13-30) disabled and also once the user selects the disbaled items , the combo box should take care of not selecting the options How could I do this .. Regards, Veeresh

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      Veeresh Hiremath wrote:

      I have a combo-box consisting of 30 elements. I want the elements from 1-12 enabled , and the rest(13-30) disabled

      I doubt if this is possible. I don't think you could disable specific items in a CComboBox.

      Veeresh Hiremath wrote:

      How could I do this ..

      List only what is valid.

      Nobody can give you wiser advice than yourself. - Cicero

      1 Reply Last reply
      0
      • V Veeresh Hiremath

        Hi all, I have a combo-box consisting of 30 elements. I want the elements from 1-12 enabled , and the rest(13-30) disabled and also once the user selects the disbaled items , the combo box should take care of not selecting the options How could I do this .. Regards, Veeresh

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        Veeresh Hiremath wrote:

        I want the elements from 1-12 enabled , and the rest(13-30) disabled

        you have to subclass the CComboBox for same.. subclassing is the key to this type of effect

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you

        1 Reply Last reply
        0
        • V Veeresh Hiremath

          Hi all, I have a combo-box consisting of 30 elements. I want the elements from 1-12 enabled , and the rest(13-30) disabled and also once the user selects the disbaled items , the combo box should take care of not selecting the options How could I do this .. Regards, Veeresh

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          there's an article here on CP that does that. here it is[^]


          Maximilien Lincourt Your Head A Splode - Strong Bad

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups