tom rozek
Posts: 14
Joined: 2011-03-03
|
hey,
I'd like to set an image to a picture but it's size is about 75x30 and when i set it as a button image it's shrunk to 16x16 i guess. Is there any way to set size of whole button or just the picture to whatever dimensions i want?
regards,
Tom |
|
Dmitry Kostochko
Add-in Express team
Posts: 2875
Joined: 2004-04-05
|
Hi Tom,
Images on ribbon buttons can be only 16x16 or 32x32. |
|
tom rozek
Posts: 14
Joined: 2011-03-03
|
;/
is there a way to use windows.forms.button as a part of a ribbon?
any ideas how to add a custom size button and image to ribbon?
and what about CommandBarButtons, it is possible to set height and width for them but how to stretch the image to fit the button size? |
|
Dmitry Kostochko
Add-in Express team
Posts: 2875
Joined: 2004-04-05
|
Hi Tom,
Images for all ribbon buttons have fixed sizes, this is the Microsoft Office ribbon's limitation. Command bar buttons also have such limitations, their image size is limited to 16x16. It is impossible to embed a .NET control into the ribbon either. Sorry, but it looks like your task is not feasible, at least in Office 2007 applications.
But in Office 2010 applications you can use their Backstage View, it supports adding images of various sizes. |
|
tom rozek
Posts: 14
Joined: 2011-03-03
|
hi Dimirty,
In older Outlooks i used advanced controls and bound them with windows.forms.buttons that allowed me to set their sizes and images as i wanted it. But unfortunately i couldn't find anything like that for ribbons. in offices 2007 i use commandbars so it works for me too.
How to change images of my advanced buttons OnMouseOver? I tested it and the event fires up but changing the image doesn't work. Maybe i should refresh the button, i try this and it doesn't work for me:
Private Sub Button_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles abtnButton.MouseEnter
Me.abtnButton.Image = Global.Plugin.My.Resources.buttonOvr
Me.ACAdapter.UpdateControlObj(Me)
Me.abtnButton.Refresh()
what do i do wrong?
and how to handle the same event for ADXRibbonButton ? |
|
Dmitry Kostochko
Add-in Express team
Posts: 2875
Joined: 2004-04-05
|
Hi Tom,
You can get access to an embedded instance of your Windows.Forms.Button by using the ActiveInstance property of the ADXCommandBarAdvancedControl class.
and how to handle the same event for ADXRibbonButton ?
A ribbon button does not have an event like MouseEnter. |
|