Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
ToolBase.Owner doesn't change at all.
posted

Hallo,

we are using the UltraToolBarsManagers in our GUI.

It contains several PopUpMenuTools.

The PopUpMenuTools again contain several ButtonTools.

Therefore I expected that the Owner-Property of the ButtonTools would be the corresponding PopUpMenuTool.

Instead the owner is the ToolBarsManager, no matter if the ButtonTool is contained in a PopUpMenu or not.

Therefore I have two questions:

1. Am I doing something wrong here and this behavior is to be expected or may I have encountered a bug?

2. Is it somehow possible to set the owner in code or can it be done in the designer?

Regards,

Florian Schmidt

Recy-Systems AG

Parents
No Data
Reply
  • 2197
    posted

    Hello Florian.

    No, you're not doing anything wrong and this is not a bug; it is expected behavior. The Owner property is read-only so you will not be able to set it. When a tool, such as a button tool, is first instantiated the Owner property is null. Once the tool is added to the tools collection this property is set to the owner of the parent collection which will be the ToolbarsManager since it is the owner of all tools collections.

Children
No Data