Transparent toolbar color

Discussion in 'SolidWorks' started by Owenreagh, Jul 29, 2004.

  1. Owenreagh

    Owenreagh Guest

    I have created a dll addin for Solidworks 2004

    I have implemented a toolbar and six buttons using AddToolbar3 and
    AddToolbarCommand2.

    I am able to add the toolbar ok with the large and small button
    bitmaps

    My button images do not fill the entire area of the button and I have
    not been able to work out how to make the button backgrounds
    transparent.

    This is an issue, because not all computers have the same toolbar
    background color. So no matter which variaton of grey I use, it will
    not look good on all computers.

    Is there a way of either specifying which color is transparent or a
    different way of creating the buttons/images

    Thanks in advance
    Brian
     
    Owenreagh, Jul 29, 2004
    #1
  2. The API documentation for AddToolbar4, which loads bitmaps from file instead
    of from a resource, states that:

    "The bitmap images should contain the bitmaps for each of the buttons
    (including separators) in the toolbar as a single bitmap. For a small
    bitmap, the image for each button must be 16x15; for a large bitmap, it must
    be 22x22. The bitmaps should use a 16-color palette. Use gray (RGB 192, 192,
    192) for transparent areas in your bitmap."



    AddToolbar4 replaces gray (RGB 192, 192, 192) with the actual toolbar
    background color. Maybe AddToolbar3 is the same? If you don't need your
    addin to work prior to SolidWorks 2004, then you could use AddToolbar4,
    which works OK for me.



    I also found out from SolidWorks API support that, in SolidWorks 2005,
    AddToolbar4 supports both 16-color palette and 256-color palette, which is
    good for XP-style toolbars.

    --

    Paul Delhanty

    CADCAMbridge Ltd

    SolidWorks Research Partner

    http://www.cadcambridge.net
     
    Paul Delhanty, Jul 29, 2004
    #2
  3. Owenreagh

    rocheey Guest

    Is there a way of either specifying which color is transparent or a
    "Invisible" background color is RGB 192, 192, 192
     
    rocheey, Jul 29, 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.