Toolbar buttons

Discussion in 'AutoCAD' started by Roderic Simon Potter, Jul 22, 2004.

  1. Hi guys and gals

    If you have a toolbar button group, where there are say 4 choices, and you
    can make them all display (fly-out), you can select one of them and then
    this one that you selected will remain visible on-screen because you picked
    it.

    The question is - is there a way to make this happen without actually
    picking it? For instance if when you open a drawing a variable is read,
    which would by its value determine which of the buttons should be displayed?

    This is beyond my abilities for the moment...
     
    Roderic Simon Potter, Jul 22, 2004
    #1
  2. Generally by default the first (top-most or left-most) button on the toolbar
    (when you open it) is the one which stays at top.
    Now if you want to be different for different drawings you are opening at
    one session - I can't figure anything for now. Then what variable you plan
    to use?
    John
     
    John Georgiev, Jul 22, 2004
    #2
  3. I set certain variables during drawing sessions, and these are saved to
    drawing specific data files.

    When a drawing is opened, the data file is read, and the variables are set
    from that data. Some of the variables can be changed by clicking on certain
    toolbar buttons - what I would like is to be able to read the setting for
    the variable, and then based upon its value, make the relevant button be the
    one that is "on top".

    I hope this makes more sense now, thanks John.
     
    Roderic Simon Potter, Jul 23, 2004
    #3
  4. You *might* be able to change the bitmap image of the flyout toolbutton using the VBA GetBitmaps and
    SetBitMaps methods to change the picture of the flyout button to that of the desired underlying
    toolbar's button image.

    I say *might* because I haven't tried it. Look at VBA Help under the ToolBarItem object and and the
    AttachToolbarToFlyout example.
     
    Allen Johnson, Jul 23, 2004
    #4
  5. This is great advice Allen, many thanks!
     
    Roderic Simon Potter, Jul 23, 2004
    #5
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.