Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Embed editfields in ArrayCtrl
Re: Embed editfields in ArrayCtrl [message #24295 is a reply to message #24292] |
Sat, 09 January 2010 09:38   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Sat, 09 January 2010 00:47 |
Not to say anything bad about your templat - it is clever "not knowing enough about interface definition" design. But it is sort of overkill - if you are going to override RightDown, you can skip the part about translating mouse coordinates...
|
ArrayCtrl::RightDown() doesn't need a correct mouse point ?
Quote: |
....and invoking ArrayCtrl's RightDown and just create the menu of only ArrayCtrl items and call Menu::Execute in RightDown...
|
If I've right understood, you mean I should override EditField's RightDown(as I deed), just invoke ArrayCtrl's one (as in my template) but without need to translate mouse coords, then override also ArrayCtrl's RightDown() in order to invoke it's Menu::Execute ?
Besides that then I need to override ALSO the ArrayCtrl's RightDown (which forces me to derive from ArrayCtrl instead of using it directly), but how do then ArrayCtrl know on which row my mouse pointer is ? I think it's needed for row deletion, at least.
I added mouse translation just because on first try I didn't and the arrayctrl was always fetching the first row.
BTW, the best way would of course be to integrate the behaviour in ArryaCtrl, making it hook inside embedded ctrls menus, but then we would face again with the problem of Ctrls deletion, which can't be done without override Ctrls RightCtrl.
As you correctly pointed to me, the 'true' problem is not the ctrl removing from inside the callback by itself, but the fact that Ctrls RightDown tries to re-set focus on itself AFTER the callback execution.
Thinking a bit more, the solution should be :
1- Add the behaviour to ArrayCtrl, but...
2- Use your PostCallback way to handle the event
I think I'll try it today 
Max
|
|
|
 |
|
Embed editfields in ArrayCtrl
By: mdelfede on Fri, 08 January 2010 00:30
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mirek on Fri, 08 January 2010 13:45
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mirek on Fri, 08 January 2010 13:57
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mrjt on Fri, 08 January 2010 14:49
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mirek on Fri, 08 January 2010 15:28
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mrjt on Fri, 08 January 2010 15:56
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mirek on Fri, 08 January 2010 15:33
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mdelfede on Fri, 08 January 2010 18:40
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mdelfede on Fri, 08 January 2010 18:39
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mirek on Sat, 09 January 2010 00:44
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mirek on Sat, 09 January 2010 00:47
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mdelfede on Sat, 09 January 2010 09:38
|
 |
|
Re: Embed editfields in ArrayCtrl
By: mirek on Sat, 09 January 2010 12:47
|
Goto Forum:
Current Time: Wed Apr 30 07:58:26 CEST 2025
Total time taken to generate the page: 0.03841 seconds
|