Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Add Ctrls to ArrayCtrl
Add Ctrls to ArrayCtrl [message #20069] |
Mon, 16 February 2009 09:59 |
MatthiasG
Messages: 27 Registered: January 2008 Location: Germany
|
Promising Member |
|
|
Hello,
i have a class derived from ParentCtrl, consisting of a button and a few EditStrings. I want this to show up in a column of an ArrayCtrl. In my ArrayCtrl i did the following:
array.AddColumn ("Column1", 1).Ctrls<MyLayout>();
array.Add();
array.Add();
At first, it seemed to work, my Ctrl is showing in the ArrayCtrl, but it seems that it is eating all mouse-events. No Mousewheel is possible, and no rmb menu is showing up.
What can i do, to make this work?
greetings,
Matthias
|
|
|
Re: Add Ctrls to ArrayCtrl [message #20071 is a reply to message #20069] |
Mon, 16 February 2009 10:51 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
MatthiasG wrote on Mon, 16 February 2009 03:59 | Hello,
i have a class derived from ParentCtrl, consisting of a button and a few EditStrings. I want this to show up in a column of an ArrayCtrl. In my ArrayCtrl i did the following:
array.AddColumn ("Column1", 1).Ctrls<MyLayout>();
array.Add();
array.Add();
At first, it seemed to work, my Ctrl is showing in the ArrayCtrl, but it seems that it is eating all mouse-events. No Mousewheel is possible, and no rmb menu is showing up.
What can i do, to make this work?
greetings,
Matthias
|
Err, and what have you expected? U++ delivers mouse events to widget with mouse pointer.
However, MyLayout suggests that it is in fact some sort of minidialog. There is magic "IgnoreMouse" modifier that will deliver the mouse events to parent widget. Maybe if you activate this for your layout ParentCtrl, you will get what you desire. You can use IgnoreMouse for any Ctrl, but of course, ignoring mouse inputs is not always what you want to achieve.
Mirek
|
|
|
|
Re: Add Ctrls to ArrayCtrl [message #20146 is a reply to message #20069] |
Sat, 21 February 2009 21:50 |
MatthiasG
Messages: 27 Registered: January 2008 Location: Germany
|
Promising Member |
|
|
Hello, an thank you for your answer.
I came up with the following in my main class:
void ChildMouseEvent (Ctrl *child, int event, Point p, int zdelta, dword keyflags) {
if (event == MOUSEWHEEL && array.HasChildDeep(child) == true) {
array.MouseWheel(p, zdelta, keyflags);
}
}
seems to work so far...
greetings,
Matthias
|
|
|
Goto Forum:
Current Time: Mon Apr 29 02:34:43 CEST 2024
Total time taken to generate the page: 0.02749 seconds
|