Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个显示不同种类(类)对象的树视图。当我右键单击一个对象时,我想显示一个特定于对象类的弹出菜单。我怎样才能做到这一点?
别介意,我认为已经找到了解决方案。我在每个类中创建了一个菜单,使用 menu > fromString 函数,当我单击每个对象时,我会尝试将此菜单分配给 treeview contextMenu 属性。