Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Context menu in a embedded class?
Re: Context menu in a embedded class? [message #19535 is a reply to message #19528] |
Fri, 12 December 2008 11:26   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
It depends on what type of Ctrl dbgrid1 is.
If it's ArrayCtrl then use the WhenBar callback
If it's GridCtrl then I'm not very familiar with it, but WhenMenuBar seems to be what you need.
Searching for 'Bar&' in a Ctrl's header file usually points you at the correct callback if it has one.
For a generic 'simple' Ctrl that doesn't have a callback you can use something like this template:
template <class T>
struct WithBar : public T
{
Callback1<Bar&> WhenBar;
virtual void RightDown(Point p, dword keyflags) { MenuBar::Execute(WhenBar); }
};
[Updated on: Fri, 12 December 2008 11:26] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Aug 07 23:55:17 CEST 2025
Total time taken to generate the page: 0.04825 seconds
|