Thank you, Juergen:) I'll try it out. Regards,
Yu ----------------------原邮件------------------- Hi, it looks fine but your URL is wrong, try for example these URLs: statusbar -> private:resource/statusbar/statusbar menubar -> private:resource/menubar/menubar toolbar -> private:resource/toolbar/standardbar Juergen Liao Yu wrote: > Hi, all: > I've been trying to do some menubar and toolbar hide-and- > show work in java, but got stuck somewhere near success. > Here's what I've done: > 1. get the XDesktop interface; > 2. get the current frame by XDesktop.getCurrentFrame(); > 3. query the com.sun.star.beans.XPropertySet interface from > XFrame; > 4. get drafts.com.sun.star.frame.XLayoutManager from > XPropertyset; > 5. hide the bars with XLayoutManager.hideElement. > When running, no error ocurs, no exception caught, but no > effect as well. Here is the corresponding code in java: > oInterface = (XInterface) oMSF.createInstance > ( "com.sun.star.frame.Desktop" );//oMSF is a > MultiServiceFactory > oDesktop = ( XDesktop ) > UnoRuntime.queryInterface( XDesktop.class, oInterface ); > XFrame xFrame=(XFrame)oDesktop.getCurrentFrame(); > Object aLayoutManager =xPropSet.getPropertyValue > ( "LayoutManager" ); > XLayoutManager xLayoutManager =(XLayoutManager) > UnoRuntime.queryInterface > (drafts.com.sun.star.frame.XLayoutManager.class, > aLayoutManager ); > xLayoutManager.hideElement > ( "private:resource/toolbar/statusbar" ); > > Anyone have any idea what is wrong? Thank you in advance! > > Regards, > > Yu > 此致 > 敬礼! > > > 廖宇 > > > ---------------------------------------------------------- ----------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: dev- [EMAIL PROTECTED] > ------------------------------------------------------------ --------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
