Knut Olav Bøhmer wrote:
So I undersdand that I have to set the "style = ICON", But i don't
understand where the icon comes from.
from the pragramatic toolbar spesification (
http://specs.openoffice.org/ui_in_general/api/ProgrammaticControlOfMenuAndToolbarItems.sxw)
it says that you have to add Icons to "res/commandimagelist" and
"so_res/commandimagelist", and the name shoud be:

sc_<commandname> for small color images
lc_<commandname> for large color images
sch_<commandname> for small highcontrast images
lch_<commandname> for large highcontrast images

But I do not know which property that says "commandname", or where it goes?
Hi Knut,

The <commandname> in your example is the command URL without the schema, e.g. ".uno:Open" is converted to
- "sc_open"
- "lc_open"
- "sch_open"
- "lch_open"

You set the command URL in your code with CreatetoolbarItem(...).

Function CreateToolbarItem( Command as String, Label as String ) as Variant
   Dim aToolbarItem(3) ' as new com.sun.star.beans.PropertyValue

   // The command you want to be dispatched if the user presses the
   // button. It also references an optional image.
   aToolbarItem(0) = MakePropertyValue("CommandURL", Command)
   ...

   CreateToolbarItem = aToolbarItem()
End Function

There can be problems with Basic URLs which reference images. I currently investigate this problem and will post information as soon as I have found the root cause.

Regards,
Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to