Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1307
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 Smile

Max
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problems with ArrayCtrl and SetFont
Next Topic: Assertion in GridCtrl
Goto Forum:
  


Current Time: Fri Apr 19 16:30:04 CEST 2024

Total time taken to generate the page: 0.03714 seconds