Carsten Driesner wrote:
Andrew Douglas Pitonyak wrote:
What are the basic steps to create a simple toolbar in basic?
Hi Andrew,
You don't need to create an add-on, but it would make life much easier
if you just want to use built-in commands. No coding, just define the
content of your toolbar in a xml file.
Never done this before... I should learn how.
For all Writer documents, however, I am guessing that I need to use
the ConfigurationProvider service, but this is only a guess.
No, that's not the way to go. You have to retrieve the module ui
configuration manager and there you can change module dependent
toolbars. (See Basic example below)
Thanks, the example was EXACTLY what I needed
In your example, you have the following code, which works:
If ( oModuleCfgMgr.hasSettings( sTBURL )) Then
oModuleCfgMgr.replaceSettings( sTBURL, oTBSettings )
Else
oModuleCfgMgr.insertSettings( sTBURL, oTBSettings )
End If
This code, however, has a problem:
If ( oModuleCfgMgr.hasSettings( sTBURL )) Then
'oModuleCfgMgr.replaceSettings( sTBURL, oTBSettings )
oModuleCfgMgr.RemoveSettings( sTBURL, oTBSettings )
oModuleCfgMgr.insertSettings( sTBURL, oTBSettings )
Else
oModuleCfgMgr.insertSettings( sTBURL, oTBSettings )
End If
While testing, I wanted to make a toolbar go away, so I "REMOVED" the
settings. I was no longer able to create a new toolbar with the URL of
the "removed" toolbar. There are no errors, it simply does nothing.
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]