Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Combining SetAutoChangeID() and TearOffCommandSet()? Collapse All
Subject Author Date
Robert Webb Jun 30, 2009 - 1:10 AM

Some of our toolbar buttons only work if you click in the top half of the button!  If you click on the bottom half no message is ever sent.  Let me start from the beginning...

Some of the buttons on our toolbars have separated drop-downs.  That is, there’s a small arrow under the buttons which opens another drop-down toolbar.  This toolbar can be torn off and docked like any toolbar.  So we are using TearOffCommandSet() to attach the original button to its drop-down toolbar.  However we are also using SetAutoChangeID() on that button, so that the main part of the button (not the arrow) is always updated with the last item selected from its drop-down.  This means that the button always has the same ID as one of the items on the drop-down, and buttons with the same ID will appear in two separate toolbar resources too (the main toolbar and the tear-off toolbar).  If we tear-off and dock that drop-down, then two buttons with the same ID are visible on the screen, one in each toolbar.  One has the drop-down arrow, and one does not.  Now here’s the problem.  The button on the tear-off must be clicked in the top half to have any effect.  I think somewhere in the Prof-UIS code it is thinking that this second button ALSO has a drop-down arrow, and is thus ignoring clicks in the bottom half of that button.

Is this making any sense to you?  Took us a while to track it down this far!



Technical Support Jul 1, 2009 - 9:03 AM

Such tear off toolbar buttons with split drop down arrow are demonstrated in the BitmapEditor sample application. We don’t see any problems with these split buttons there. Did you modify the button behavior somehow?

Robert Webb Jul 2, 2009 - 12:20 AM

I don’t see the same thing in the BitmapEditor sample.  It has split drop-downs, but not ones using SetAutoChangeID().

Anyway, I’ve found a work-around now.  We were using the same basic ID for the split drop-down button and one of the items on the drop-down toolbar.  That is, the same ID appeared in both toolbar resources.  Now instead I use a different ID for the drop-down.  SetAutoChangeID() only modifies the effective ID, and the problem only seems to occur when the basic IDs are the same.