cmdbar button faces question

When I add my own button to the BO toolbar and add a button face to the button the button face turns to disabled after I select the button. The problem is that the disabled button does not look very nice.

I know that in other environments you can create 4 button faces, 1 for active, 1 for disabled, 1 for clicked and another one (I forget about that).

If I change the faceid for the button and executed the cmdbut.pasteface I see no difference. So this function does not seem to work? Or maybe the faceid’s need to be a special number but I wasn’t able to find anything about this in the documentation. Further more is there a way to keep the button always on? Just like some other BO buttons (new file etc).

Thanks for your reaction.

Raymond


raymond (BOB member since 2002-10-03)

Create a form (hidden) insert your button images (16*16 pixel) and use the following code

                                    
Set boNewCmdBar = boCmdBarPopupSub.Controls.Add(boControlButton)
                                    boNewCmdBar.Caption = "Version Manager CheckIn"
                                    boNewCmdBar.DescriptionText = "Retrieve versioned document from Version Manager"
                                    boNewCmdBar.OnAction = "VmBo.rea!ThisDocument.VmBoCheckin"
                                    boClipboard.SetData FrmIcons.VmCheckin.Picture
                                    boNewCmdBar.PasteFace
 

jp.golay :switzerland: (BOB member since 2002-06-17)

Dear JP,

Copying one face to the button is not the problem. But you will problably know that if you press the button the button will be come dimmed. I don’t know how to control this dimmed button. Normally a dimmed button has the same image but in gray. I want to have control over this dimmed face.

The question is how can you load this dimmed face into the button?

Cheers

Raymond


raymond (BOB member since 2002-10-03)