Hi.

I am confused by add-on toolbars. My add-on toolbar doesn't show up when listing the LayoutManager's elements via

 Sub ListToolbars
   Dim x as Variant
   Dim s as String

For Each x in ThisComponent.GetCurrentController.GetFrame.LayoutManager.getElements()
     s = s & x.ResourceURL & CHR$(10)
   Next

   MsgBox s, 0, "Toolbars in Component"
 End Sub

All add-on toolbars show as "0" in this list instead of showing a URL. The standard toolbars are "fully equipped" as seen by

 Dim x as Variant
x = ThisComponent.GetCurrentController.GetFrame.LayoutManager.getElement("private:resource/toolbar/standardbar")
 Xray x

but if I check my own add-on toolbar in a very simple add-on "doobiedoo.my.toolbar" (or any other add-on toolbar - I tried installing a few)

 Dim x as Variant
x = ThisComponent.GetCurrentController.GetFrame.LayoutManager.getElement("private:resource/toolbar/addon_doobiedoo.my.toolbar")
 Xray x

the returned object is rather naked and lacks all the properties needed for manipulating its state. What's going on ?

Am I unable to change the settings of an add-on toolbar that is defined by an .XCU file - e.g. disable/enable buttons ? Or is it just Basic that is stopping me ? Can I do it from e.g. Python ?

Cheers
-- Jan Holst Jensen

Reply via email to