Hi,
I am trying to create a common toolbar that I can use in several places. the probem I am having is that the ComboTool on the bar is not throwing the events i want to pic up and it is reverting to a DropDownlist from a dropdown.
Heres how i am doing this
In the constructon of the from cantaning a toolmanager i have
m_saveExportToolBar = new SaveExportToolBar<ReconstructionDesignModelList, ReconstructionDesignModel>();
m_toolbarsManager.Toolbars.Add(m_saveExportToolBar);
when adding the toolbar the combo gets changed
in the constructor of the toolbar I have
m_selectionCombo = new ComboBoxTool("Selection") {ValueList = new ValueList(0), DropDownStyle = DropDownStyle.DropDown};
m_selectionCombo.SharedPropsInternal.Caption = "Selection";
m_selectionCombo.SharedPropsInternal.Category = "Reconstruction";
m_selectionCombo.ToolValueChanged += SelectionComboOnToolValueChanged;
m_selectionCombo.BeforeToolEnterEditMode += SelectionComboOnBeforeToolEnterEditMode;
m_selectionCombo.AfterToolExitEditMode += SelectionComboOnAfterToolExitEditMode;
any ideas?
steven Evans
Hello,
Thank you for your feedback and for sharing this with us. We believe that the other community members could benefit from such threads.
Please feel free to let me know if a question about our toolset comes up on your mind.
removing adding the controls to the toolbar in the constructor and adding this code fixed the issue
protected override void OnAddedToCollection(KeyedSubObjectsCollectionBase primaryCollection)
{
((ToolbarsCollection)primaryCollection).ToolbarsManager.Tools.AddRange(new ToolBase[] { m_selectionCombo });
base.OnAddedToCollection(primaryCollection);
Tools.AddRange(new ToolBase[] { m_selectionCombo });
}
Think I should be using the PFL but it works for now