Toolbar state buttons

Discussion in 'AutoCAD' started by Rakesh Rao, Oct 1, 2004.

  1. Rakesh Rao

    Rakesh Rao Guest

    Rakesh Rao, Oct 1, 2004
    #1
  2. Rakesh Rao

    dblaha Guest

    There's no way to change the appearance of a toolbar button dynamically like this without rebuilding the menu each time.

    Dave
     
    dblaha, Oct 1, 2004
    #2
  3. Rakesh Rao

    j.buzbee Guest

    "There's no way to change the appearance of a toolbar button dynamically
    like this without rebuilding the menu each time."

    Really? then why does this work? ;-)


    (setq menus(vlax-get(vlax-get-acad-object)'menugroups)
    menu(vlax-invoke menus 'item "acad")
    toolbars(vlax-get menu 'toolbars)
    toolbar(vlax-invoke toolbars 'item "layers")
    button(vlax-invoke toolbar 'item "Layer Properties Manager"))

    ;change to the ai_molc
    (vla-setbitmaps button
    "RCDATA_16_MOLC" "RCDATA_16_MOLC")
    ;change back
    (vla-setbitmaps button
    "RCDATA_16_LAYERS" "RCDATA_16_LAYERS")

    jb
     
    j.buzbee, Oct 1, 2004
    #3
Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.