OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

ToolFunBar

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
migue
General User
General User


Joined: 06 Oct 2004
Posts: 46

PostPosted: Mon Jan 17, 2005 5:06 am    Post subject: ToolFunBar Reply with quote

Hi,
I have the followings method for hide and display toolbars and menubars:
Code:

    public void setMenuBarVisible(boolean visible)
    {
        OfficeCommand command = new OfficeCommand(SID_TOGGLEMENUBAR);
        command.appendParameter("MenuBarVisible", new Boolean(visible));
        command.execute(this);
   }
...
    public void setToolFunBarVisible(boolean visible)
    {
        OfficeCommand command = new OfficeCommand(SID_TOGGLETOOLFUNBAR);
        command.appendParameter("ToolFunBarVisible", new Boolean(visible));
        command.execute(this);
        bToolFunBarVisible = visible;
   }

All method are ok except setToolFunBar.
This method display and hide without attend the boolean parameter.
I think that the string "ToolFunBarVisible" isn't correct.
The value of SID_TOGGLETOOLFUNBAR is 5910.
What's the correct string parameter?

Thanks a lot.
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Mon Jan 17, 2005 5:56 am    Post subject: Reply with quote

Interesting to see how you run the dispatches.
See http://www.oooforum.org/forum/viewtopic.php?t=6890 for a direct answer.
I have also written code that detects whether designmode of a document is on or off, same can be done for the visibility of toolbars : http://www.oooforum.org/forum/viewtopic.php?t=6890

Without this detection mechanism you never know if the toolbar is visible or not.

As a note I can also recommend reading through the relevant sections in Andrew Pitonyak's macro document, it contains some further explanation.

Christian
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
migue
General User
General User


Joined: 06 Oct 2004
Posts: 46

PostPosted: Tue Jan 18, 2005 12:17 am    Post subject: Reply with quote

Thanks a lot.

The list that I need I have found it in your links:
http://framework.openoffice.org/files/documents/25/1042/commands_11beta.html
It looks old and it hasn't got the parameters but it serves me a lot.

Also I say you that the previous code of setMenuBarVisible it's ok.
If I pass a true value put the MenuBar visible and I pass a false value put the MenuBar hidden. If I pass a true value and the MenuBar already visible then it doesn't anything. I don't need to control it.
Back to top
View user's profile Send private message
migue
General User
General User


Joined: 06 Oct 2004
Posts: 46

PostPosted: Tue Jan 18, 2005 12:30 am    Post subject: Reply with quote

After I consult the links the correct paremeter is "FunctionBarVisible".
Other links very interest for this subject is:
http://ooo.ximian.com

Thanks for all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group