Home » U++ Library support » Menus&Toolbars » MenuBar.Execute seems to ignore owner - Bug?
MenuBar.Execute seems to ignore owner - Bug? [message #45544] |
Sun, 29 November 2015 07:36  |
slashupp
Messages: 231 Registered: July 2009
|
Experienced Member |
|
|
debian 64b
Trying to get menu to popup in center of a control in my window, using Execute(Ctrl*owner, Point p),
no matter what I do it interprets the point as absolute (screen) coordinates.
edit:
I came up with this to find the absolute coord's of myctrl:
Rect myctrl::get_abs_tree_rect()
{
Ctrl *p=GetParent();
Rect w, r=GetRect();
while (p) { w=p->GetRect(); r.left+=w.left; r.top+=w.top; p=p->GetParent(); } //top parent (p==nullptr) should have absolute coord's?
return r;
}
seems to work ...
[Updated on: Sun, 29 November 2015 09:58] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 14 23:04:34 CEST 2025
Total time taken to generate the page: 0.00455 seconds
|