On 10/12/06, Carsten Driesner <[EMAIL PROTECTED]> wrote:
Mathias Bauer wrote:

> We already have such conditional items. Some functions are available
> only if CTL is enabled. These items are removed by sending a special
> status update, perhaps you can find it in the code (grep for
> "SfxVisibilityItem") in Calc or Writer.
>
> I know for sure that this works for toolbar items, I hope it also does
> for the menu.

Hi Kohei,

I think the idea from Mathias is the best way to implement your feature.
Both user interface elements, menu bar and toolbar, support the
SfxVisibilityItem/com.sun.star.frame.status.Visibility types to have
make menu items/toolbar items dynamically visible/invisible.
If you want to modify the XML files during build time, you can use
patch/diff to apply your changes. Currently we have no separate tool
which can manipulate this special kind of XML files.

Thanks Mathias and Carsten,

I'll probably look into setting the visibility of the menu item at run
time.  The patch method at build time is actually along the line of
what I had in mind, but changing the visibility seems cleaner,
especially when two other engineers recommend it. :-)

Thanks for your advice.

Regards,
Kohei

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

Reply via email to