- Offizieller Beitrag
Q: I don't see the toolbar although I activated using SetEditorMode
A: You can activate the toolbar and other "panels" using SetEditorMode. But the toolbar is auto sized. If there is no contents in the toolbar it will be practically invisible.
This probably happens in your application. Since by default the toolbar (and panels) have no contents you need to specify the GUI definition file and load it. This is done with method SetLayout(). We provide a layout file buttons.pcc which can be used here. Using the provided package editor you can also add and delete items from all panels, create custom buttons which trigger the OnButtonClick event and also modify the drop downs.
Note: If SetLayout was used but the PCC file was not found you will hear a beep at startup of the application. (MessageBeep API)
The package file also contains the localization strings.
Typically initialisation in C#:
using System.Text;
using System.Windows.Forms;
using WPDynamic; // reference to the TextDynamic wrapper
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
// 1.) Set the Editor Mode
WPDLLInt1.SetEditorMode
(
EditorMode.wpmodDoubleEditor,
EditorXMode.wpmodexToolbarLG, // = ModeX
EditorGUI.wpguiHorzScrollBar | // = GUI of upper Editor
EditorGUI.wpguiPanelH1 | EditorGUI.wpguiPanelV1 |
EditorGUI.wpguiPanelV2 | EditorGUI.wpguiRuler |
EditorGUI.wpguiVertRuler | EditorGUI.wpguiVertScrollBar
, EditorGUI.wpguiVertScrollBar // = GUI of lower Editor
);
// 2.) Load the PCC file
WPDLLInt1.SetLayout("..\\buttons.pcc", "");
Alles anzeigen
Regards,
Julian Ziersch