Customize Toolbars: Difference between revisions

From FreeCAD Documentation
(add "Since version 0.15 there is a ......")
No edit summary
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{TutorialInfo|Class=SampleClass|Level=Beginner|Time=5 minutes|Author=[[User:Mario52|Mario52]]|FCVersion=All}}
{{TutorialInfo|Topic=SampleTopic|Level=Beginner|Time=5 minutes|Author=[[User:Mario52|Mario52]]|FCVersion=All}}


==Synopsis== <!--T:2-->
==Synopsis== <!--T:2-->
This tutorial shows you the customization of toolbars. Tools (inclusive Macro-tools) can used in different workbenches. In an example a Macro becomes a Macro-tool by creation of a '''Menu text''', a '''Tool tip''' and an '''Icon'''. Afterwards this Macro-tool becomes part of an extra toolbar in a workbench.
This tutorial walks you through how to create a Toolbar button and one or more buttons that connect you to your favourite macros or to other associated links whether there a custom icon or not.


==Use== <!--T:3-->
==Use== <!--T:3-->
<u>'''1.''' Find the Customize Menu</u>


<!--T:4-->
<!--T:4-->
'''1''' : Click '''Menu → Tools → Customize'''
*Click {{MenuCommand|Main Menu → Tools → Customize}},



<!--T:5-->
<!--T:5-->
Line 17: Line 18:


<!--T:6-->
<!--T:6-->
*or right click on any toolbar.
or put you on a Toolbar and click the right mouse button


<!--T:7-->
<!--T:7-->
[[File:CustomizeToolBar 02.png|640px|center|Click the right mouse button]]
[[File:CustomizeToolBar 02.png|640px|center|Right mouse click]]
{{clear}}
{{clear}}


<!--T:8-->
<!--T:8-->
the window Customize appears
*The Customize window appears.


<!--T:9-->
<!--T:9-->
[[File:CustomizeToolBar 03.png|640px|center|The window Customize appears]]
[[File:CustomizeToolBar 03.png|640px|center|The Customize window appears]]
{{clear}}
{{clear}}

<!--T:52-->
<u>'''2.''' Make a Macro to a Macro-Tool</u>


<!--T:10-->
<!--T:10-->
*Select the "Macro" tab.
'''2''' : select the tab Macro


<!--T:11-->
<!--T:11-->
'''3''' : to select an toolbar icon for your macro click the Pixmap button (labelled {{KEY|... }})
*To add an icon for the provided macro click the Pixmap button (labelled {{KEY|... }}).


<!--T:12-->
<!--T:12-->
[[File:CustomizeToolBar 04.png|640px|center|Select an toolbar]]
[[File:CustomizeToolBar 04.png|640px|center|Select a toolbar]]
{{clear}}
{{clear}}


<!--T:13-->
<!--T:13-->
'''4''' : search for an icon amongst the icons already in FreeCAD,
*Search for an appropriate icon from amongst FreeCAD's existing icons,


<!--T:47-->
<!--T:47-->
Line 47: Line 51:


<!--T:48-->
<!--T:48-->
'''5''' : if your icon is not here then click the {{KEY|Add icons...}} button for adding one or more icons in your library (collapse to see)
&nbsp; &nbsp; &nbsp; [or add your own icon by clicking {{KEY|Add icons...}}]. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(expand for an example)


<!--T:49-->
<!--T:49-->
Line 57: Line 61:


<!--T:15-->
<!--T:15-->
'''5b''' : you will get a file selection window, select your image file which must be in the PNG format and must be 64x64 pixels
&nbsp; &nbsp; &nbsp;[You will get a file selection window, select your custom image file (PNG format, 64x64 pixels)]


<!--T:16-->
<!--T:16-->
Line 68: Line 72:


<!--T:17-->
<!--T:17-->
'''6''' : select your icon and click the {{KEY|OK}} button
* Select your icon and click {{KEY|OK}}.


<!--T:18-->
<!--T:18-->
Line 75: Line 79:


<!--T:19-->
<!--T:19-->
'''7''' : the icon you selected is now displayed next to the Pixmap button labelled {{KEY|...}}
* The icon you selected is now displayed next to the Pixmap button labelled {{KEY|...}}.


<!--T:20-->
<!--T:20-->
Line 82: Line 86:


<!--T:21-->
<!--T:21-->
'''8''' : Choose your macro and specify a Menu text (which will appear as the text label in the menu); also fill in the Tool Tip (which is the text that will appear when a mouse is over the button on the toolbar); there are other optional fields for your Button
*Select the provided macro in line '''Macro:''' and specify a '''Menu text''': (which will appear as the text label in the menu); also fill in the '''Tool Tip':'' (which is the text that will appear when a mouse is over the button on the toolbar); further lines are optional.


<!--T:22-->
<!--T:22-->
'''9''' : Click the button {{KEY|Add}}
* Click the button {{KEY|Add}}.


<!--T:23-->
<!--T:23-->
Line 92: Line 96:


<!--T:24-->
<!--T:24-->
'''10''' : your button is created
*The button of the macro-tool is now created.


<!--T:25-->
<!--T:25-->
Line 99: Line 103:


<!--T:26-->
<!--T:26-->
<u>'''3.''' Create a toolbar outside the workbench '''Macro''' which contains the created '''Macro-tool'''</u>
'''11''' : create a Toolbar for the button


<!--T:27-->
<!--T:27-->
'''12''' : click the tab '''Toolbars''' and your workbench (here '''Part''')
* Select the '''Toolbars''' tab and choose the workbench (for which the toolbar is provided) in the drop down on the right ('''Part''' in this example).


<!--T:51-->
Since version 0.15 there is a {{KEY|[[File:Freecad.svg|16px]] Global }} toolbar. If your toolbar is attached to this bar, it will always remain visible
&nbsp; &nbsp; &nbsp;[Since version 0.15 there is a &nbsp;{{KEY|[[File:Freecad.svg|16px]] Global}}&nbsp; toolbar. If this is selected, the provided toolbar will be in each workbench.]


<!--T:28-->
<!--T:28-->
[[File:CustomizeToolBar 11.png|640px|center|Tab Toolbabs]]
[[File:CustomizeToolBar 11.png|640px|center|Toolbars tab]]
{{clear}}
{{clear}}


<!--T:29-->
<!--T:29-->
'''13''' : in left window select the Tab '''Macros''' and "Macros"
*In the dropdown on the left select '''Macros'''.


<!--T:30-->
<!--T:30-->
[[File:CustomizeToolBar 12.png|640px|center|Tab Macros > Macros]]
[[File:CustomizeToolBar 12.png|640px|center|Macros]]
{{clear}}
{{clear}}


<!--T:31-->
<!--T:31-->
'''14''' : now your macro and it's icon appears
*The macro-tool with its icon appears in the list.


<!--T:32-->
<!--T:32-->
[[File:CustomizeToolBar 13.png|640px|center|Your icon appears]]
[[File:CustomizeToolBar 13.png|640px|center|Your icon is listed]]
{{clear}}
{{clear}}


<!--T:33-->
<!--T:33-->
'''15''' : Click the button {{KEY|New...}} (you can choose your ToolBar here the ToolBar is attached to the Part Workbench)
*Click the button {{KEY|New...}}


<!--T:34-->
<!--T:34-->
[[File:CustomizeToolBar 14.png|640px|center|Click the button New]]
[[File:CustomizeToolBar 14.png|640px|center|Click on "New"]]
{{clear}}
{{clear}}


<!--T:35-->
<!--T:35-->
'''16''' : in the window "New Toolbar" enter the name for your ToolBar and click {{KEY|OK}}
*In the window "New Toolbar" enter the name of the provided extra toolbar for the '''Part''' Workbench and click {{KEY|OK}}


<!--T:36-->
<!--T:36-->
[[File:CustomizeToolBar 15.png|640px|center|Enter the name for your Toolbar]]
[[File:CustomizeToolBar 15.png|640px|center|Enter the name for your toolbar]]
{{clear}}
{{clear}}


<!--T:37-->
<!--T:37-->
*The toolbar is now created.
'''17''' : your ToolBar has now been created - make sure you check the checkbox so the toolbar will actually appear


<!--T:38-->
<!--T:38-->
'''18''' : select your macro with it's icon in the left window and then click the {{KEY|Button}} with the right pointing arrow
*To add the creadet macro-tool to this toolbar, select it in the left window and then click the {{KEY|Button}} with the arrow pointing right.


<!--T:39-->
<!--T:39-->
Line 149: Line 154:


<!--T:40-->
<!--T:40-->
'''19''' : you have now created a toolbar called "Camera"
* You have created now a toolbar called "Camera" (with the Macro-tool '''Camera''' in it)


<!--T:41-->
<!--T:41-->
'''20''' : click the {{KEY|Close}} button
*Click the {{KEY|Close}} button.


<!--T:42-->
<!--T:42-->
Line 159: Line 164:


<!--T:43-->
<!--T:43-->
*Your new toolbar is now contained in the toolbars' right-click menu. Its Icons (in our example only the camera) are visible, if the toolbar is activated (blue checkmark).
'''21''' : your new ToolBar with it's button is now both displayed above the active window as well as the right-click menu from the toolbars


<!--T:44-->
<!--T:44-->
Line 165: Line 170:
{{clear}}
{{clear}}


<!--T:45-->
'''22''' : enjoy !




<!--T:46-->
[[Category:Tutorials]]
</translate>
</translate>
{{clear}}
{{clear}}
<languages/>

Revision as of 20:17, 2 August 2018

Tutorial
Topic
SampleTopic
Level
Beginner
Time to complete
5 minutes
Authors
Mario52
FreeCAD version
All
Example files
None
See also
None

Synopsis

This tutorial shows you the customization of toolbars. Tools (inclusive Macro-tools) can used in different workbenches. In an example a Macro becomes a Macro-tool by creation of a Menu text, a Tool tip and an Icon. Afterwards this Macro-tool becomes part of an extra toolbar in a workbench.

Use

1. Find the Customize Menu

  • Click Main Menu → Tools → Customize,
Customize
Customize
  • or right click on any toolbar.
Right mouse click
Right mouse click
  • The Customize window appears.
The Customize window appears
The Customize window appears

2. Make a Macro to a Macro-Tool

  • Select the "Macro" tab.
  • To add an icon for the provided macro click the Pixmap button (labelled ... ).
Select a toolbar
Select a toolbar
  • Search for an appropriate icon from amongst FreeCAD's existing icons,

      [or add your own icon by clicking Add icons...].                  (expand for an example)

Add icon
Add icon

     [You will get a file selection window, select your custom image file (PNG format, 64x64 pixels)]

Get a file
Get a file
  • Select your icon and click OK.
Select your icon
Select your icon
  • The icon you selected is now displayed next to the Pixmap button labelled ....
Your icon is displayed
Your icon is displayed
  • Select the provided macro in line Macro:' and specify a Menu text: (which will appear as the text label in the menu); also fill in the Tool Tip': (which is the text that will appear when a mouse is over the button on the toolbar); further lines are optional.
  • Click the button Add.
Click the button
Click the button
  • The button of the macro-tool is now created.
Your button is created
Your button is created

3. Create a toolbar outside the workbench Macro which contains the created Macro-tool

  • Select the Toolbars tab and choose the workbench (for which the toolbar is provided) in the drop down on the right (Part in this example).

     [Since version 0.15 there is a   Global  toolbar. If this is selected, the provided toolbar will be in each workbench.]

Toolbars tab
Toolbars tab
  • In the dropdown on the left select Macros.
Macros
Macros
  • The macro-tool with its icon appears in the list.
Your icon is listed
Your icon is listed
  • Click the button New...
Click on "New"
Click on "New"
  • In the window "New Toolbar" enter the name of the provided extra toolbar for the Part Workbench and click OK
Enter the name for your toolbar
Enter the name for your toolbar
  • The toolbar is now created.
  • To add the creadet macro-tool to this toolbar, select it in the left window and then click the Button with the arrow pointing right.
Select your macro
Select your macro
  • You have created now a toolbar called "Camera" (with the Macro-tool Camera in it)
  • Click the Close button.
Close
Close
  • Your new toolbar is now contained in the toolbars' right-click menu. Its Icons (in our example only the camera) are visible, if the toolbar is activated (blue checkmark).
New Toolbar
New Toolbar