Animated Command Bar Buttons and Change Command Bar Icon dynamically

Add-in Express™ Support Service
That's what is more important than anything else

Animated Command Bar Buttons and Change Command Bar Icon dynamically
 
semantique




Posts: 23
Joined: 2010-04-01
Hi,

as your answer to my last question has been that it's not possible to achieve the desired result, we've discussed internally on how we can circumvent the problem.

We've got two major and one minor question, that are very essential:


  • how can you change the background image of a command bar button dynamically
  • how can you determine a mouse over event of a command bar button (e.g. track mouse position and intersect it with position of button, custom event, IE-event, etc.)


Minor question


  • we would like to have an animated command bar button (e.g. animated GIF). How can you achieve this?


We would really appreciate a creative answer, i.e. not just a plain "no", but possible alternative suggestions.

Thank.
Posted 22 Jun, 2010 05:17:23 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Hi Vincent,

There's nothing you can do with buttons shown in the built-in IE toolbar. If you show your buttons on a custom toolbar, you can use any .NET controls and achieve any of the results above.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jun, 2010 05:30:13 Top
semantique




Posts: 23
Joined: 2010-04-01
Hi Andrei,

We would appreciate if you could reply to the individual questions we were asking.

We did not purchase a premium member-ship to get the usual "this does not work" answers.

E.g. we know it's possible to track a mouse position. And we know it's possible (although not the standard-way) to get the position of a command bar button. The question is whether there is an easier way to accomplish the same functionality and if not, why you missed citing the above?

Thanks
Posted 22 Jun, 2010 05:35:41 Top
semantique




Posts: 23
Joined: 2010-04-01
Hi Andrei,

does a toolbar always have to stretch over 100% of the browser width, resp. what are possible positions/locations for the toolbar.

Thanks
Posted 22 Jun, 2010 05:37:01 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Hi Vincent,

I'm sorry, for not answering the questions above. In fact I don't understand them completely.

Let's clarify: a "Command Bar button" is a button added to the built-in IE toolbar (to agree on terminology is the very first step to mutual understanding). Are you talking about command bar buttons shown on the built-in IE toolbar or .NET controls shown on a custom toolbar?

semantique writes:
how can you change the background image of a command bar button dynamically


If you talk about .NET controls then I don't see any problems. As to command bar buttons, this is PROBABLY possible but this requires a lot of research work with no guarantee of success; moreover, Sergey Grischenko has said that with probablity 50-70%, the result will be negative in IE 8. Also note that such code will be unmanaged.

To answer your other questions, I need to have an answer to my question above.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jun, 2010 06:16:30 Top
semantique




Posts: 23
Joined: 2010-04-01
Hi Andrei,

1. how can you change the background image of a command bar button dynamically


Let's clarify: a "Command Bar button" is a button added to the built-in IE toolbar (to agree on terminology is the very first step to mutual understanding). Are you talking about command bar buttons shown on the built-in IE toolbar or .NET controls shown on a custom toolbar?


yes, you are right about "Command Bar Button".

User added an image

now what we want to do is animate it. i.e. instead of using just plain ico use gif . How we can achieve this?

2. how can you determine a mouse over event of a command bar button (e.g. track mouse position and intersect it with position of button, custom event, IE-event, etc.)

Only OnClick event is available. How we can get access to onmouseover event?
Posted 22 Jun, 2010 06:31:22 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Vincent,

semantique writes:
how can you change the background image of a command bar button dynamically


This is PROBABLY possible but this requires a lot of research work with no guarantee of success; we think that with probablity 50-70% the result will be negative in IE 8. This cannot be done within the Add-in Express framework; this can be done as part of our custom development services only. If you need to know more about his, please let me know and responsible people will contact you ASAP.

semantique writes:
now what we want to do is animate it. i.e. instead of using just plain ico use gif . How we can achieve this?


This isn't possible; the Toolbar Button Style Guide does mention .ICO files only.

semantique writes:
how can you determine a mouse over event of a command bar button


This can be done as part of our custom development services only.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jun, 2010 07:00:25 Top
semantique




Posts: 23
Joined: 2010-04-01
Hi Andrei,

thanks a lot for coming back with your elaborated answers.

In this context we would have another question: how much work would it be to add a custom .NET control to the built-in IE toolbar.

Thanks and bests
Posted 22 Jun, 2010 07:04:58 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Hi Vincent,

Because this area is a mine field with no maps or documents, it will take a month (aproximately) in order to UNDERSTAND if it is possible to do any of the things above with a built-in command bar button (in particular, to draw a .NET control over such a button).

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jun, 2010 07:20:58 Top
semantique




Posts: 23
Joined: 2010-04-01
Hi Andrei,

understood.

What other options are there that help us satisfy the following needs:
(i) place 2 buttons next to each other on installation
(ii) change button icons programmatically/dynamically
(iii) occupy the LEAST space possible

What we would like to avoid is to waste a whole toolbar for just two buttons. The whole bar then seems so empty (with just two buttons on it).

We would like to guarantee the tollbar/buttons are installed at a specific position for a specific look and feel (if the user would like to remove/move it lateron, that's fine with us). And we would like to avoid using a whole toolbar for it, since it pushes the visible are of the browser down by approx. 50 pixels.

Could you provide some alternative suggestions please?

Thanks
Posted 22 Jun, 2010 07:31:44 Top