| View previous topic :: View next topic |
| Author |
Message |
migue General User


Joined: 06 Oct 2004 Posts: 46
|
Posted: Mon Jan 17, 2005 5:06 am Post subject: ToolFunBar |
|
|
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 |
|
 |
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Mon Jan 17, 2005 5:56 am Post subject: |
|
|
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 |
|
 |
migue General User


Joined: 06 Oct 2004 Posts: 46
|
Posted: Tue Jan 18, 2005 12:17 am Post subject: |
|
|
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 |
|
 |
migue General User


Joined: 06 Oct 2004 Posts: 46
|
Posted: Tue Jan 18, 2005 12:30 am Post subject: |
|
|
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 |
|
 |
|