Customize Toolbars/ru: Difference between revisions
(Created page with "{{TutorialInfo/ru|Topic=SampleTopic|Level=Beginner|Time=5 minutes|Author=Mario52|FCVersion=All}}") |
(Updating to match new version of source page) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
{{TutorialInfo/ru|Topic=SampleTopic|Level=Beginner|Time=5 minutes|Author=[[User:Mario52|Mario52]]|FCVersion=All}} |
{{TutorialInfo/ru|Topic=SampleTopic|Level=Beginner|Time=5 minutes|Author=[[User:Mario52|Mario52]]|FCVersion=All}} |
||
==Synopsis== |
==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. |
|||
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== |
==Use== |
||
<u>'''1.''' Find the Customize Menu</u> |
|||
*Click {{MenuCommand|Main Menu → Tools → Customize}}, |
|||
[[File:CustomizeToolBar 01.png|640px|center|Customize]] |
[[File:CustomizeToolBar 01.png|640px|center|Customize]] |
||
{{clear}} |
{{clear}} |
||
*or right click on any toolbar. |
|||
or put you on a Toolbar and click the right mouse button |
|||
[[File:CustomizeToolBar 02.png|640px|center| |
[[File:CustomizeToolBar 02.png|640px|center|Right mouse click]] |
||
{{clear}} |
{{clear}} |
||
*The Customize window appears. |
|||
[[File:CustomizeToolBar 03.png|640px|center|The |
[[File:CustomizeToolBar 03.png|640px|center|The Customize window appears]] |
||
{{clear}} |
{{clear}} |
||
'''2''' |
<u>'''2.''' Make a Macro to a Macro-Tool</u> |
||
*Select the "Macro" tab. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
{{clear}} |
{{clear}} |
||
*Search for an appropriate icon from amongst FreeCAD's existing icons, |
|||
<div class="mw-collapsible mw-collapsed toccolours"> |
<div class="mw-collapsible mw-collapsed toccolours"> |
||
[or add your own icon by clicking {{KEY|Add icons...}}]. (expand for an example) |
|||
<div class="mw-collapsible-content"> |
<div class="mw-collapsible-content"> |
||
Line 40: | Line 43: | ||
{{clear}} |
{{clear}} |
||
[You will get a file selection window, select your custom image file (PNG format, 64x64 pixels)] |
|||
[[File:CustomizeToolBar 06.png|640px|center|Get a file]] |
[[File:CustomizeToolBar 06.png|640px|center|Get a file]] |
||
Line 48: | Line 51: | ||
</div> |
</div> |
||
* Select your icon and click {{KEY|OK}}. |
|||
[[File:CustomizeToolBar 07.png|640px|center|Select your icon]] |
[[File:CustomizeToolBar 07.png|640px|center|Select your icon]] |
||
{{clear}} |
{{clear}} |
||
* The icon you selected is now displayed next to the Pixmap button labelled {{KEY|...}}. |
|||
[[File:CustomizeToolBar 08.png|640px|center|Your icon is displayed]] |
[[File:CustomizeToolBar 08.png|640px|center|Your icon is displayed]] |
||
{{clear}} |
{{clear}} |
||
''' |
*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 {{KEY|Add}}. |
|||
[[File:CustomizeToolBar 09.png|640px|center|Click the button]] |
[[File:CustomizeToolBar 09.png|640px|center|Click the button]] |
||
{{clear}} |
{{clear}} |
||
*The button of the macro-tool is now created. |
|||
[[File:CustomizeToolBar 10.png|640px|center|Your button is created]] |
[[File:CustomizeToolBar 10.png|640px|center|Your button is created]] |
||
{{clear}} |
{{clear}} |
||
<u>'''3.''' Create a toolbar outside the workbench '''Macro''' which contains the created '''Macro-tool'''</u> |
|||
'''11''' : create a Toolbar for the button |
|||
* 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 {{KEY|[[File:Freecad.svg|16px]] Global |
[Since version 0.15 there is a {{KEY|[[File:Freecad.svg|16px]] Global}} toolbar. If this is selected, the provided toolbar will be in each workbench.] |
||
[[File:CustomizeToolBar 11.png|640px|center| |
[[File:CustomizeToolBar 11.png|640px|center|Toolbars tab]] |
||
{{clear}} |
{{clear}} |
||
*In the dropdown on the left select '''Macros'''. |
|||
[[File:CustomizeToolBar 12.png|640px|center| |
[[File:CustomizeToolBar 12.png|640px|center|Macros]] |
||
{{clear}} |
{{clear}} |
||
*The macro-tool with its icon appears in the list. |
|||
[[File:CustomizeToolBar 13.png|640px|center|Your icon |
[[File:CustomizeToolBar 13.png|640px|center|Your icon is listed]] |
||
{{clear}} |
{{clear}} |
||
*Click the button {{KEY|New...}} |
|||
[[File:CustomizeToolBar 14.png|640px|center|Click |
[[File:CustomizeToolBar 14.png|640px|center|Click on "New"]] |
||
{{clear}} |
{{clear}} |
||
*In the window "New Toolbar" enter the name of the provided extra toolbar for the '''Part''' Workbench and click {{KEY|OK}} |
|||
[[File:CustomizeToolBar 15.png|640px|center|Enter the name for your |
[[File:CustomizeToolBar 15.png|640px|center|Enter the name for your toolbar]] |
||
{{clear}} |
{{clear}} |
||
*The toolbar is now created. |
|||
'''17''' : your ToolBar has now been created - make sure you check the checkbox so the toolbar will actually appear |
|||
*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. |
|||
[[File:CustomizeToolBar 16.png|640px|center|Select your macro]] |
[[File:CustomizeToolBar 16.png|640px|center|Select your macro]] |
||
{{clear}} |
{{clear}} |
||
* You have created now a toolbar called "Camera" (with the Macro-tool '''Camera''' in it) |
|||
*Click the {{KEY|Close}} button. |
|||
[[File:CustomizeToolBar 17.png|640px|center|Close]] |
[[File:CustomizeToolBar 17.png|640px|center|Close]] |
||
{{clear}} |
{{clear}} |
||
*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 |
|||
[[File:CustomizeToolBar 18.png|640px|center|New Toolbar]] |
[[File:CustomizeToolBar 18.png|640px|center|New Toolbar]] |
||
{{clear}} |
{{clear}} |
||
==Notes for Python based functions like those in Draft== |
|||
'''22''' : enjoy ! |
|||
If you want to use a Draft or other Python based function in a toolbar they don't seem to be available in the drop down list at the left side. You first have to load the corresponding workbench, e.g. Draft, and then you will find the functions available when selecting "Python" in the left drop down menu. |
|||
{{clear}} |
{{clear}} |
||
⚫ |
Revision as of 16:37, 12 October 2019
Руководство |
Тема |
---|
SampleTopic |
Уровень |
Beginner |
Время для завершения |
5 minutes |
Авторы |
Mario52 |
FreeCAD версия |
All |
Примеры файлов |
None |
Смотрите также |
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,
- or right click on any toolbar.
- 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 ... ).
- Search for an appropriate icon from amongst FreeCAD's existing icons,
[or add your own icon by clicking Add icons...]. (expand for an example)
[You will get a file selection window, select your custom image file (PNG format, 64x64 pixels)]
- Select your icon and click OK.
- The icon you selected is now displayed next to the Pixmap button labelled ....
- 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.
- The button of the macro-tool is now 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.]
- In the dropdown on the left select Macros.
- The macro-tool with its icon appears in the list.
- Click the button New...
- In the window "New Toolbar" enter the name of the provided extra toolbar for the Part Workbench and click OK
- 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.
- You have created now a toolbar called "Camera" (with the Macro-tool Camera in it)
- Click the Close button.
- 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).
Notes for Python based functions like those in Draft
If you want to use a Draft or other Python based function in a toolbar they don't seem to be available in the drop down list at the left side. You first have to load the corresponding workbench, e.g. Draft, and then you will find the functions available when selecting "Python" in the left drop down menu.